Re: [PHP] Soap / Wsdl Beginner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17 December 2010 12:14, bkrqpzef <bjornulf.frode@gmail.com> wrote:
>
> I did it !!
> Ok it seems that the system need to have all variables initialize in the
> request.
> <ns1:CIVILITE xsi:nil="true"/> doesn't work
> but
> <ns1:CIVILITE></ns1:CIVILITE> work
> with a $wsvitaneo->inputData->i_SOUSCRIP->CIVILITE = ""; (and 0 for
> integers)
> That's a good thing to know if you're stuck like i was.
> It's kind of boring to initialize so many variables to 0 and null string...
> but whatever.
> Thx again for your support.
>
>
> RQuadling wrote:
>>
>> On 16 December 2010 18:22, bkrqpzef <bjornulf.frode@gmail.com> wrote:
>>>
>>> You think it's a problem with Cegema's server ?
>>> I mean... Cegema is kind of a big company.
>>>
>>>
>>> RQuadling wrote:
>>>>
>>>> On 16 December 2010 17:37, bkrqpzef <bjornulf.frode@gmail.com> wrote:
>>>>>
>>>>> i did that :
>>>>> http://old.nabble.com/file/p30474731/all.php all.php
>>>>>
>>>>>
>>>>> RQuadling wrote:
>>>>>>
>>>>>> On 16 December 2010 08:06, bkrqpzef <bjornulf.frode@gmail.com> wrote:
>>>>>>>
>>>>>>> Here i am again. Damn this is hard. :s
>>>>>>> I was almost able to add another webservice. But now i'm stuck with a
>>>>>>> weird
>>>>>>> error :
>>>>>>>
>>>>>>> Fatal error: Uncaught SoapFault exception:
>>>>>>> [soapenv:Server.generalException]
>>>>>>> java.lang.NullPointerException in WSVITANEOServicesService.php:175
>>>>>>> Stack
>>>>>>> trace: #0 WSVITANEOServicesService.php(175):
>>>>>>> SoapClient->__soapCall('wsvitaneo', Array, Array) #1 all.php(56):
>>>>>>> WSVITANEOServicesService->wsvitaneo(Object(wsvitaneo)) #2 {main}
>>>>>>> thrown
>>>>>>> in
>>>>>>> WSVITANEOServicesService.php on line 175
>>>>>>>
>>>>>>> The main page is all.php and contain on the line 56 : $TarifResponse
>>>>>>> =
>>>>>>> $service->wsvitaneo($Tarif);
>>>>>>> and in the other php file generated by wsdl2php from line 170 to 176
>>>>>>> :
>>>>>>> Âpublic function wsvitaneo(wsvitaneo $parameters) {
>>>>>>> Â Âreturn $this->__soapCall('wsvitaneo', array($parameters),
>>>>>>> array(
>>>>>>> Â Â Â Â Â Â'uri' => 'http://wsvitaneo.wsbeans.iseries',
>>>>>>> Â Â Â Â Â Â'soapaction' => ''
>>>>>>> Â Â Â Â Â )
>>>>>>> Â Â Â);
>>>>>>> Â}
>>>>>>>
>>>>>>> It doesn't seems wrong to me, i used the same thing without problems
>>>>>>> with
>>>>>>> the other webservice.
>>>>>>>
>>>>>>> http://old.nabble.com/file/p30470719/all.php all.php
>>>>>>> http://old.nabble.com/file/p30470719/WSVITANEOServicesService.php
>>>>>>> WSVITANEOServicesService.php
>>>>>>>
>>>>>>>
>>>>>>> RQuadling wrote:
>>>>>>>>
>>>>>>>> On 8 December 2010 13:48, bkrqpzef <bjornulf.frode@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>> Haaa you saved myeagain. Just coupled with array it works very
>>>>>>>>> well.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> RQuadling wrote:
>>>>>>>>>>
>>>>>>>>>> Â$Garanties->ResumeGaranties = new WSResumeGarantieInput();
>>>>>>>>>>
>>>>>>>>>> Should be
>>>>>>>>>>
>>>>>>>>>> $Garanties->ResumeGarantiesParams = new WSResumeGarantieInput();
>>>>>>>>>>
>>>>>>>>>> <s:element name="ResumeGaranties">
>>>>>>>>>> <s:complexType>
>>>>>>>>>> <s:sequence>
>>>>>>>>>> <s:element minOccurs="0" maxOccurs="1" name="astr_Clef"
>>>>>>>>>> type="s:string"/>
>>>>>>>>>> <s:element minOccurs="0" maxOccurs="1"
>>>>>>>>>> name="ResumeGarantiesParams"
>>>>>>>>>> type="tns:WSResumeGarantieInput"/>
>>>>>>>>>> </s:sequence>
>>>>>>>>>> </s:complexType>
>>>>>>>>>> </s:element>
>>>>>>>>
>>>>>>>> Congratulations.
>>>>>>>>
>>>>>>>> --
>>>>>>>> Richard Quadling
>>>>>>>> Twitter : EE : Zend
>>>>>>>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>>>>>>>
>>>>>>>> --
>>>>>>>> PHP Soap Mailing List (http://www.php.net/)
>>>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/-PHP--Soap---Wsdl-Beginner-tp30277723p30470719.html
>>>>>>> Sent from the Php - Soap mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> PHP Soap Mailing List (http://www.php.net/)
>>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Your all.php is missing the try/catch code.
>>>>>>
>>>>>> Add this back in. It'll help you see what the error is.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Richard Quadling
>>>>>> Twitter : EE : Zend
>>>>>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>>>>>
>>>>>> --
>>>>>> PHP Soap Mailing List (http://www.php.net/)
>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/-PHP--Soap---Wsdl-Beginner-tp30277723p30474731.html
>>>>> Sent from the Php - Soap mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> --
>>>>> PHP Soap Mailing List (http://www.php.net/)
>>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>
>>>>>
>>>>
>>>> Your error is in the Java code on the server.
>>>>
>>>> Exception
>>>> ---------
>>>> java.lang.NullPointerException
>>>>
>>>> Not a PHP error.
>>>>
>>>> As long as your XML matches the requirements dictated by the WSDL file
>>>> then your code is fine.
>>>>
>>>>
>>>>
>>>> --
>>>> Richard Quadling
>>>> Twitter : EE : Zend
>>>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>>>
>>>> --
>>>> PHP Soap Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/-PHP--Soap---Wsdl-Beginner-tp30277723p30475087.html
>>> Sent from the Php - Soap mailing list archive at Nabble.com.
>>>
>>>
>>> --
>>> PHP Soap Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>
>> Well, there app has crashed with a null pointer exception.
>>
>> Most likely it is due to your data, but it should be responding with
>> something more sensible than crashing.
>>
>> Hopefully, you can ask them what is missing.
>>
>>
>> --
>> Richard Quadling
>> Twitter : EE : Zend
>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
>>
>> --
>> PHP Soap Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/-PHP--Soap---Wsdl-Beginner-tp30277723p30480330.html
> Sent from the Php - Soap mailing list archive at Nabble.com.
>
>
> --
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

A far easier route would be to alter the classes that are produced by
the wsdl2php code.

So, taking something like ...

class ResumeGaranties {
  public $astr_Clef; // string
  public $ResumeGarantiesParams; // WSResumeGarantieInput
}


and changing that to ...

class ResumeGaranties {
  public $astr_Clef = ''; // string
  public $ResumeGarantiesParams; // WSResumeGarantieInput
}

COULD be enough.

This would be a one off hit on the classes and you should be done.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux