You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Vinod Soni <vi...@btinternet.com> on 2001/12/04 16:09:13 UTC

Apache and Microsoft SOAP Interoperability

Can someone tell me if there is any incompatibility issue between Apache SOAP and Microsoft SOAP ? I am using Apache SOAP Client with Microsoft SOAP Server, and the server fails to understand the XML envelope which it receives ? Can someone forward me an example where an interoperability between Apache and Microsoft is shown ?

Thanks
Vinod.

RE: Apache and Microsoft SOAP Interoperability

Posted by Stuart O'Day <st...@ezgov.com>.
This link did it for me.

http://www.perfectxml.com/articles/xml/soapguide.asp

  -----Original Message-----
  From: Vinod Soni [mailto:vinod74@btinternet.com]
  Sent: Tuesday, December 04, 2001 10:09 AM
  To: Soap User
  Subject: Apache and Microsoft SOAP Interoperability


  Can someone tell me if there is any incompatibility issue between Apache
SOAP and Microsoft SOAP ? I am using Apache SOAP Client with Microsoft SOAP
Server, and the server fails to understand the XML envelope which it
receives ? Can someone forward me an example where an interoperability
between Apache and Microsoft is shown ?

  Thanks
  Vinod.

Re: Apache and Microsoft SOAP Interoperability

Posted by Tim Wei <ti...@yahoo.com>.
Dear Sir,

Are you sure this works:

SOAPMappingRegistry smr = new SOAPMappingRegistry();
StringDeserializer sd = new StringDeserializer();
smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"),
null, null, sd);

I can not make it work.

My code is as follows:

    OldUser     theUser = new OldUser(username, domain);
    Display     display = new Display(screenname);
    UserDetails userDetails = new UserDetails(theUser,display);
    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    BeanSerializer beanSer = new BeanSerializer();
    
    // Map the types.
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new
QName("http://service.messagevine.com/soap/ri/",
""),UserDetails.class, beanSer, beanSer);
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new
QName("http://service.messagevine.com/soap/ri/",
""),OldUser.class, beanSer, beanSer);
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new
QName("http://service.messagevine.com/soap/ri/",
""),Display.class, beanSer, beanSer);

The resulted client request is as follows:(I really want to have
the <userdetails and the <display tags without the attribute at
all, I do not know how)

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">

<SOAP-ENV:Body>

<ns1:SetProfile
xmlns:ns1="http://service.messagevine.com/soap/ri/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<userdetails xsi:type="ns1:">
<user xsi:type="ns1:">
<name xsi:type="xsd:string">timuser</name>
<domain xsi:type="xsd:string">mytelusmobility.com</domain>
</user>
<display xsi:type="ns1:">
<nickname xsi:type="xsd:string">timscreen</nickname>
</display>
</userdetails>

</ns1:SetProfile>

</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


--- Chris Malley <cm...@pixelzoom.com> wrote:
> Gianpiero wrote:
> > 
> > > Can someone tell me if there is any incompatibility issue
> > > between Apache SOAP and Microsoft SOAP?
> > 
> > It's not so difficult.The Apache SOAP implementation always
> puts the
> > xsi:type elements for all the parameters in the request
> while Microsoft SOAP
> > Toolkit does not. You can handle this situation by
> instructing Apache SOAP
> > Client to not to expect the xsi:type attribute in the
> response received.
> > This is done by following lines in the client code:
> > 
> > SOAPMappingRegistry smr = new SOAPMappingRegistry();
> > StringDeserializer sd = new StringDeserializer();
> > smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("",
> "Result"), null, null,
> > sd);
> [...]
> 
> Or you can add xsi:type attributes in MS SOAP like this:
> 
>   ISoapSerializerPtr pSerializer;  // smart pointer
>   pSerializer->startElement( "firstName", "", "NONE", "" );
>   pSerializer->SoapAttribute( "type", "", "xsd:string", "xsi"
> );
>   pSerializer->writeString( "Wallace" );
>   pSerializer->endElement();
> 
> -Chris
> 
> -- 
> Chris Malley
> PixelZoom, Inc.             Voice: +1.303.494.8849
> 835 Orman Drive             EMail: cmalley@pixelzoom.com
> Boulder CO 80303-2616


=====
Tim's home page: 
http://www.geocities.com/timwei

__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

Re: Apache and Microsoft SOAP Interoperability

Posted by Tim Wei <ti...@yahoo.com>.
Dear Sir,

Are you sure this works:

SOAPMappingRegistry smr = new SOAPMappingRegistry();
StringDeserializer sd = new StringDeserializer();
smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"),
null, null, sd);

I can not make it work.

My code is as follows:

    OldUser     theUser = new OldUser(username, domain);
    Display     display = new Display(screenname);
    UserDetails userDetails = new UserDetails(theUser,display);
    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    BeanSerializer beanSer = new BeanSerializer();
    
    // Map the types.
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new
QName("http://service.messagevine.com/soap/ri/",
""),UserDetails.class, beanSer, beanSer);
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new
QName("http://service.messagevine.com/soap/ri/",
""),OldUser.class, beanSer, beanSer);
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new
QName("http://service.messagevine.com/soap/ri/",
""),Display.class, beanSer, beanSer);

The resulted client request is as follows:(I really want to have
the <userdetails and the <display tags without the attribute at
all, I do not know how)

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">

<SOAP-ENV:Body>

<ns1:SetProfile
xmlns:ns1="http://service.messagevine.com/soap/ri/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<userdetails xsi:type="ns1:">
<user xsi:type="ns1:">
<name xsi:type="xsd:string">timuser</name>
<domain xsi:type="xsd:string">mytelusmobility.com</domain>
</user>
<display xsi:type="ns1:">
<nickname xsi:type="xsd:string">timscreen</nickname>
</display>
</userdetails>

</ns1:SetProfile>

</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


--- Chris Malley <cm...@pixelzoom.com> wrote:
> Gianpiero wrote:
> > 
> > > Can someone tell me if there is any incompatibility issue
> > > between Apache SOAP and Microsoft SOAP?
> > 
> > It's not so difficult.The Apache SOAP implementation always
> puts the
> > xsi:type elements for all the parameters in the request
> while Microsoft SOAP
> > Toolkit does not. You can handle this situation by
> instructing Apache SOAP
> > Client to not to expect the xsi:type attribute in the
> response received.
> > This is done by following lines in the client code:
> > 
> > SOAPMappingRegistry smr = new SOAPMappingRegistry();
> > StringDeserializer sd = new StringDeserializer();
> > smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("",
> "Result"), null, null,
> > sd);
> [...]
> 
> Or you can add xsi:type attributes in MS SOAP like this:
> 
>   ISoapSerializerPtr pSerializer;  // smart pointer
>   pSerializer->startElement( "firstName", "", "NONE", "" );
>   pSerializer->SoapAttribute( "type", "", "xsd:string", "xsi"
> );
>   pSerializer->writeString( "Wallace" );
>   pSerializer->endElement();
> 
> -Chris
> 
> -- 
> Chris Malley
> PixelZoom, Inc.             Voice: +1.303.494.8849
> 835 Orman Drive             EMail: cmalley@pixelzoom.com
> Boulder CO 80303-2616


=====
Tim's home page: 
http://www.geocities.com/timwei

__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

Re: Apache and Microsoft SOAP Interoperability

Posted by Chris Malley <cm...@pixelzoom.com>.
Gianpiero wrote:
> 
> > Can someone tell me if there is any incompatibility issue
> > between Apache SOAP and Microsoft SOAP?
> 
> It's not so difficult.The Apache SOAP implementation always puts the
> xsi:type elements for all the parameters in the request while Microsoft SOAP
> Toolkit does not. You can handle this situation by instructing Apache SOAP
> Client to not to expect the xsi:type attribute in the response received.
> This is done by following lines in the client code:
> 
> SOAPMappingRegistry smr = new SOAPMappingRegistry();
> StringDeserializer sd = new StringDeserializer();
> smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"), null, null,
> sd);
[...]

Or you can add xsi:type attributes in MS SOAP like this:

  ISoapSerializerPtr pSerializer;  // smart pointer
  pSerializer->startElement( "firstName", "", "NONE", "" );
  pSerializer->SoapAttribute( "type", "", "xsd:string", "xsi" );
  pSerializer->writeString( "Wallace" );
  pSerializer->endElement();

-Chris

-- 
Chris Malley
PixelZoom, Inc.             Voice: +1.303.494.8849
835 Orman Drive             EMail: cmalley@pixelzoom.com
Boulder CO 80303-2616

Re: Apache and Microsoft SOAP Interoperability

Posted by Chris Malley <cm...@pixelzoom.com>.
Gianpiero wrote:
> 
> > Can someone tell me if there is any incompatibility issue
> > between Apache SOAP and Microsoft SOAP?
> 
> It's not so difficult.The Apache SOAP implementation always puts the
> xsi:type elements for all the parameters in the request while Microsoft SOAP
> Toolkit does not. You can handle this situation by instructing Apache SOAP
> Client to not to expect the xsi:type attribute in the response received.
> This is done by following lines in the client code:
> 
> SOAPMappingRegistry smr = new SOAPMappingRegistry();
> StringDeserializer sd = new StringDeserializer();
> smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"), null, null,
> sd);
[...]

Or you can add xsi:type attributes in MS SOAP like this:

  ISoapSerializerPtr pSerializer;  // smart pointer
  pSerializer->startElement( "firstName", "", "NONE", "" );
  pSerializer->SoapAttribute( "type", "", "xsd:string", "xsi" );
  pSerializer->writeString( "Wallace" );
  pSerializer->endElement();

-Chris

-- 
Chris Malley
PixelZoom, Inc.             Voice: +1.303.494.8849
835 Orman Drive             EMail: cmalley@pixelzoom.com
Boulder CO 80303-2616

RE: Apache and Microsoft SOAP Interoperability

Posted by Gianpiero <gi...@nch.it>.
> Can someone tell me if there is any incompatibility issue
> between Apache SOAP and Microsoft SOAP?

It's not so difficult.The Apache SOAP implementation always puts the
xsi:type elements for all the parameters in the request while Microsoft SOAP
Toolkit does not. You can handle this situation by instructing Apache SOAP
Client to not to expect the xsi:type attribute in the response received.
This is done by following lines in the client code:

SOAPMappingRegistry smr = new SOAPMappingRegistry();
StringDeserializer sd = new StringDeserializer();
smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"), null, null,
sd);

Anyway see this article:
http://www.perfectxml.com/articles/xml/soapguide.asp

Bye,
Gp

P.S.
Please use only plain text in mailing list. We do not like HTML or RTF
mails.


RE: Apache and Microsoft SOAP Interoperability

Posted by Stuart O'Day <st...@ezgov.com>.
This link did it for me.

http://www.perfectxml.com/articles/xml/soapguide.asp

  -----Original Message-----
  From: Vinod Soni [mailto:vinod74@btinternet.com]
  Sent: Tuesday, December 04, 2001 10:09 AM
  To: Soap User
  Subject: Apache and Microsoft SOAP Interoperability


  Can someone tell me if there is any incompatibility issue between Apache
SOAP and Microsoft SOAP ? I am using Apache SOAP Client with Microsoft SOAP
Server, and the server fails to understand the XML envelope which it
receives ? Can someone forward me an example where an interoperability
between Apache and Microsoft is shown ?

  Thanks
  Vinod.

RE: Apache and Microsoft SOAP Interoperability

Posted by Gianpiero <gi...@nch.it>.
> Can someone tell me if there is any incompatibility issue
> between Apache SOAP and Microsoft SOAP?

It's not so difficult.The Apache SOAP implementation always puts the
xsi:type elements for all the parameters in the request while Microsoft SOAP
Toolkit does not. You can handle this situation by instructing Apache SOAP
Client to not to expect the xsi:type attribute in the response received.
This is done by following lines in the client code:

SOAPMappingRegistry smr = new SOAPMappingRegistry();
StringDeserializer sd = new StringDeserializer();
smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "Result"), null, null,
sd);

Anyway see this article:
http://www.perfectxml.com/articles/xml/soapguide.asp

Bye,
Gp

P.S.
Please use only plain text in mailing list. We do not like HTML or RTF
mails.


RE: Apache and Microsoft SOAP Interoperability

Posted by Jared Peterson <jp...@softprotech.com>.
This is a link that was posted to the list earlier dealing with this
question.  I have not read the article but it might be of some help to
you.
 
http://www.csharphelp.com/archives/archive53.html
 
Enjoy,
Jared
 
-----Original Message-----
From: Vinod Soni [mailto:vinod74@btinternet.com] 
Sent: Tuesday, December 04, 2001 10:09 AM
To: Soap User
Subject: Apache and Microsoft SOAP Interoperability
 
Can someone tell me if there is any incompatibility issue between Apache
SOAP and Microsoft SOAP ? I am using Apache SOAP Client with Microsoft
SOAP Server, and the server fails to understand the XML envelope which
it receives ? Can someone forward me an example where an
interoperability between Apache and Microsoft is shown ?
 
Thanks
Vinod.

RE: Apache and Microsoft SOAP Interoperability

Posted by Jared Peterson <jp...@softprotech.com>.
This is a link that was posted to the list earlier dealing with this
question.  I have not read the article but it might be of some help to
you.
 
http://www.csharphelp.com/archives/archive53.html
 
Enjoy,
Jared
 
-----Original Message-----
From: Vinod Soni [mailto:vinod74@btinternet.com] 
Sent: Tuesday, December 04, 2001 10:09 AM
To: Soap User
Subject: Apache and Microsoft SOAP Interoperability
 
Can someone tell me if there is any incompatibility issue between Apache
SOAP and Microsoft SOAP ? I am using Apache SOAP Client with Microsoft
SOAP Server, and the server fails to understand the XML envelope which
it receives ? Can someone forward me an example where an
interoperability between Apache and Microsoft is shown ?
 
Thanks
Vinod.