axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Bolioli <tpbli...@terranovum.com>
Subject Re: .NET compat issue...
Date Thu, 29 Jan 2004 22:21:20 GMT
It does take a QName but it is not setting it properly. I get this output:
 <soapenv:Body>                                                                 

  <xmldata xmlns=""> from this call.setOperationName(new 
QName("http://somthing.com")); and many variations including adding the 
method name as one of the arguments.
Also, now when I set the OperationUse and the OperationStyle the 
response back from the .NET based SOAP server I get raises the below 
exception. I coded this manually instead of using the WSDL. Rumor has it 
you can feed it the WSDL descriptor and it will handle creating code for 
this. How do I do that. I lost patience with this a long time ago and I 
just need to get this done.
Thanks,
Tom


Caught Exception (org.xml.sax.SAXException: SimpleDeserializer 
encountered a child element, which is NOT expected, in something it was 
trying to deserialize.)
- Exception:
org.xml.sax.SAXException: SimpleDeserializer encountered a child 
element, which is NOT expected, in something it was trying to deserialize.
        at 
org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:189)
        at 
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
        at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
        at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
        at 
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
        at org.apache.axis.client.Call.invoke(Call.java:2272)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at org.masstech.pts.SOAP.PostString(SOAP.java:94)
        at org.masstech.pts.SOAP.PostMonthlyStringTest(SOAP.java:42)
        at arClient.main(arClient.java:187)


Dennis Sosnoski wrote:

> This depends on your client code. If you're generating client code 
> from the service WSDL Axis should take care of everything 
> automatically. In this case either there's an error in the WSDL or a 
> bug in Axis.
>
> If you're using DII to invoke the service directly, you need to 
> specify the namespace yourself (using the setOperationName() method of 
> the Call object that takes a QName, I think - I haven't used this in a 
> while). You'd also configure the encoding on the Call object to avoid 
> the extraneous encodingStyle attribute on the response, using the 
> setOperationUse("literal") call, I think, and 
> setOperationStyle("document") would hopefully eliminate the xsi:type 
> information.
>
>  - Dennis
>
> Thomas Bolioli wrote:
>
>> Thanks but I have no idea how to add the namespace declaration using 
>> the axis api (no obvious answer in the Call API) so any help there 
>> would be greatly appreciated. Is this a bug that needs to be fixed??? 
>> If so I can look into it if someone can point me to the correct class 
>> to start editing. I have limited knowledge on the Axis API so a 
>> pointer to start would be helpful.
>> Thanks,
>> Tom
>>
>>
>> Dennis Sosnoski wrote:
>>
>>  
>>
>>> Probably the more important issue here is that Axis is generating 
>>> the testpostdata element (and child element) without a namespace, 
>>> while judging from the VB client request these need to be in the 
>>> http://ar.masstech-pts.org/ namespace. If the element's in the wrong 
>>> (or no) namespace, it's garbage.
>>>
>>> - Dennis
>>>
>>> Dennis M. Sosnoski
>>> Enterprise Java, XML, and Web Services Support
>>> http://www.sosnoski.com
>>> Redmond, WA  425.885.7197
>>>
>>> Jim Murphy wrote:
>>>
>>>   
>>>
>>>> Looks like the .NET service is doc/lit and the axis client is 
>>>> sending an rpc/encoded request. Notice the 
>>>> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" attribute 
>>>> on the Body child element.
>>>>
>>>>
>>>> Thomas Bolioli wrote:
>>>>
>>>>
>>>>
>>>>     
>>>>
>>>>> I am writing an Axis client to interface with a VB.NET soap 
>>>>> service and I am having an issue with the axis client (vb client 
>>>>> apparently works) where the soap service is not getting the string 
>>>>> being passed through the only function and argument the service 
>>>>> takes. Below are the two envelopes. What could be causing this? 
>>>>> Since it is authenticating, I am pretty sure the problem is in the 
>>>>> body of the envelope and not the header. I am at a loss since the 
>>>>> differences (see testpostdata and xmldata elements) between these 
>>>>> two are minimal and seem to be more semantic than anything of 
>>>>> substance.
>>>>> Thanks in advance,
>>>>> Tom
>>>>>
>>>>> VB.Net Client envelope
>>>>>
>>>>> <?xml version="1.0" encoding="utf-8"?><soap:Envelope 
>>>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>>> <soap:Header>
>>>>> <cAuthentication xmlns="http://ar.masstech-pts.org/">
>>>>> <UserName>username</UserName>
>>>>> <Password>******</Password>
>>>>> </cAuthentication>
>>>>> </soap:Header>
>>>>> <soap:Body>
>>>>> <testpostdata xmlns="http://ar.masstech-pts.org/">
>>>>> <xmldata>String Here...
>>>>> </xmldata>
>>>>> </testpostdata></soap:Body></soap:Envelope>
>>>>>
>>>>> Axis client envelope
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <soapenv:Envelope 
>>>>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
>>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>>>>> <soapenv:Header>
>>>>> <ns1:cAuthentication soapenv:mustUnderstand="0" 
>>>>> xmlns:ns1="http://ar.masstech-pts.org/">
>>>>> <ns1:UserName>username</ns1:UserName>
>>>>> <ns1:Password>*******</ns1:Password>
>>>>> </ns1:cAuthentication>
>>>>> </soapenv:Header>
>>>>> <soapenv:Body>
>>>>> <testpostdata 
>>>>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>>>>> <xmldata xsi:type="xsd:string">String Here...
>>>>> </xmldata>
>>>>> </testpostdata>
>>>>> </soapenv:Body>
>>>>>
>>>>>
>>>>>  
>>>>>       
>>>>
>>>>
>>>>
>>>>     
>>>
>>
>>  
>>

Mime
View raw message