You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by John Baker <jb...@sasami.atomised.org> on 2005/07/14 19:56:30 UTC

.NET server, Axis 1.2.1 client, poorly formed messages

Hello,

I am using Axis (1.2.1) to connect to a .NET server, but the server isn't
deserialising the Axis generated message correctly.

I've used this wsdl:
http://www.javasystemsolutions.com/serviceRequestConnector.wsdl

And I've used the wsdl2java program to create my Java stubs. 

Now this is what Axis generates for the SubmitGeneralServiceRequest method:

<?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:Body>
  <SubmitGeneralServiceRequest xmlns="">
    <ns1:SubmittedGeneralServiceRequest xmlns:ns1="http://www.caps-solutions.co.uk/schema/uniform/72b/servicerequest/sr/srtypes">
      <ns1:ServiceRequestIdentification

(etc.)

The .NET server replies:

Server was unable to process request. A valid SubmittedGeneralServiceRequestType object is required

Now it strikes me that xmlns="" looks wrong.

Does anyone have any ideas what's going on?

Thanks,


John

Re: .NET server, Axis 1.2.1 client, poorly formed messages

Posted by John Baker <jb...@sasami.atomised.org>.
"A separate thing" ?

Well I can't play with the WSDL too much as I don't have control over the
service running on the .NET server. 

What would you suggest changing it to?


On Thu, Jul 14, 2005 at 03:28:43PM -0400, Davanum Srinivas wrote:
> see if u can get it working if you convert the inner anonymous
> complextype into a separate thing
> 
>       <xs:element name="SubmitGeneralServiceRequest">
>         <xs:complexType>
>           <xs:sequence>
>             <xs:element ref="sr:SubmittedGeneralServiceRequest"/>
>           </xs:sequence>
>         </xs:complexType>
>       </xs:element>
> 
> -- dims
> 
> On 7/14/05, John Baker <jb...@sasami.atomised.org> wrote:
> > SubmitGeneralServiceRequest
> 
> 
> -- 
> Davanum Srinivas -http://blogs.cocoondev.org/dims/

Re: .NET server, Axis 1.2.1 client, poorly formed messages

Posted by Davanum Srinivas <da...@gmail.com>.
see if u can get it working if you convert the inner anonymous
complextype into a separate thing

      <xs:element name="SubmitGeneralServiceRequest">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="sr:SubmittedGeneralServiceRequest"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>

-- dims

On 7/14/05, John Baker <jb...@sasami.atomised.org> wrote:
> SubmitGeneralServiceRequest


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/

Re: .NET server, Axis 1.2.1 client, poorly formed messages

Posted by John Baker <jb...@sasami.atomised.org>.
Anne,

You are absolutely correct. The .NET server is exposing style="document";
style="rpc" came about to fix a broken client (to Axis) getting confused
about what to do when style="document" is present in the WSDL.

I'll change it back and try this all again :)


John

On Tue, Jul 19, 2005 at 10:07:43AM -0400, Anne Thomas Manes wrote:
> John,
> 
> The empty namespace on the child element of the SOAP Body is caused by
> the fact that the WSDL specifies "rpc" style in the <soap:binding>
> definition, but it doesn't specify a namespace attribute in the
> <soap:body> definitions. (When using RPC style, you must specify a
> namespace attribute in <soap:body>.)
> 
> I'm really astonished to see a .NET server exposing a WSDL that uses
> RPC/Literal -- .NET doesn't support RPC/Literal. This WSDL is totally
> wrong for an RPC style service. It looks like a wrapped
> document/literal style service. As I said in another response I made
> to you yesterday, you should change the style to "document", and then
> it should work. (As I mentioned yesterday, you do have a number of
> elements defined in the schema with no types defined -- you should
> also define their types.)
> 
> Anne 
> 
> On 7/14/05, John Baker <jb...@sasami.atomised.org> wrote:
> > Hello,
> > 
> > I am using Axis (1.2.1) to connect to a .NET server, but the server isn't
> > deserialising the Axis generated message correctly.
> > 
> > I've used this wsdl:
> > http://www.javasystemsolutions.com/serviceRequestConnector.wsdl
> > 
> > And I've used the wsdl2java program to create my Java stubs.
> > 
> > Now this is what Axis generates for the SubmitGeneralServiceRequest method:
> > 
> > <?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:Body>
> >   <SubmitGeneralServiceRequest xmlns="">
> >     <ns1:SubmittedGeneralServiceRequest xmlns:ns1="http://www.caps-solutions.co.uk/schema/uniform/72b/servicerequest/sr/srtypes">
> >       <ns1:ServiceRequestIdentification
> > 
> > (etc.)
> > 
> > The .NET server replies:
> > 
> > Server was unable to process request. A valid SubmittedGeneralServiceRequestType object is required
> > 
> > Now it strikes me that xmlns="" looks wrong.
> > 
> > Does anyone have any ideas what's going on?
> > 
> > Thanks,
> > 
> > 
> > John
> >

Re: .NET server, Axis 1.2.1 client, poorly formed messages

Posted by Anne Thomas Manes <at...@gmail.com>.
John,

The empty namespace on the child element of the SOAP Body is caused by
the fact that the WSDL specifies "rpc" style in the <soap:binding>
definition, but it doesn't specify a namespace attribute in the
<soap:body> definitions. (When using RPC style, you must specify a
namespace attribute in <soap:body>.)

I'm really astonished to see a .NET server exposing a WSDL that uses
RPC/Literal -- .NET doesn't support RPC/Literal. This WSDL is totally
wrong for an RPC style service. It looks like a wrapped
document/literal style service. As I said in another response I made
to you yesterday, you should change the style to "document", and then
it should work. (As I mentioned yesterday, you do have a number of
elements defined in the schema with no types defined -- you should
also define their types.)

Anne 

On 7/14/05, John Baker <jb...@sasami.atomised.org> wrote:
> Hello,
> 
> I am using Axis (1.2.1) to connect to a .NET server, but the server isn't
> deserialising the Axis generated message correctly.
> 
> I've used this wsdl:
> http://www.javasystemsolutions.com/serviceRequestConnector.wsdl
> 
> And I've used the wsdl2java program to create my Java stubs.
> 
> Now this is what Axis generates for the SubmitGeneralServiceRequest method:
> 
> <?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:Body>
>   <SubmitGeneralServiceRequest xmlns="">
>     <ns1:SubmittedGeneralServiceRequest xmlns:ns1="http://www.caps-solutions.co.uk/schema/uniform/72b/servicerequest/sr/srtypes">
>       <ns1:ServiceRequestIdentification
> 
> (etc.)
> 
> The .NET server replies:
> 
> Server was unable to process request. A valid SubmittedGeneralServiceRequestType object is required
> 
> Now it strikes me that xmlns="" looks wrong.
> 
> Does anyone have any ideas what's going on?
> 
> Thanks,
> 
> 
> John
>