You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Harmeet Bedi <ha...@intraspect.com> on 2000/07/22 07:42:15 UTC
MS and Apache SOAP toolkit
I have been trying to get a Server using Apache SOAP toolkit working with SOAP SDK from MS.
The MS SDK can be got from http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/msdn-files/027/000/242/msdncompositedoc.xml
Apache SOAP homepage is http://xml.apache.org/soap
Here is what I found
1. MS SDK considers SOAP namespace to be HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01.
Apache wants the namespace to be http://schemas.xmlsoap.org/soap/envelope/. The latter is correct, but Apache toolkit is a little unforgiving. It protocol part cannot be HTTP(uppercase). It has to be lowercase
2. There are some namespace issues with the MS SDK. In the SDK, I tried to set a namespace associated with a function. changed this function in ROPEDemo Sample
Private Sub btnGetStockQuote_SW_Click()
from
oSOAP.SetPayloadData icREQUEST, "", "GetStockQuote", sRequestStruct
to
oSOAP.SetPayloadData icREQUEST, "some-ns", "GetStockQuote", sRequestStruct
this changed the Request Payload
from
<?xml version="1.0"?>
<SOAP:Envelope xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01" encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<GetStockQuote>
<symbol>MSFT</symbol>
<description>any company</description>
</GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
to
<?xml version="1.0"?>
<SOAP:Envelope xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01" encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<:GetStockQuote xmlns:="some-ns">
<symbol>MSFT</symbol>
<description>any company</description>
</:GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
Note the ':', before GetStockQuote.
MS SDK, inspite of what the documentation says, seems to make it difficult to set the Namespace. Maybe there is a way, but I couldn't figure it out in the last few hours.
If I don't specify a namespace, Apache throws a NullPointerException. Here is the stack trace
java.lang.NullPointerException
at org.apache.soap.util.xml.QName.setNamespaceURI(QName.java:108)
at org.apache.soap.util.xml.QName.<init>(QName.java:102)
at org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:231)
at org.apache.soap.Envelope.unmarshall(Envelope.java:213)
Is it mandatory that the function should have a Namespace associated with it ? The examples in specs have namespace associated with function and it seems the right thing, but what is the official word ? This may indicate that there is a bug in Apache toolkit or that MS SDK Examples wrong.
would appreciate any pointers/suggestions to get these two toolkits working together
thanks,
Harmeet
Re: MS and Apache SOAP toolkit
Posted by Harmeet Bedi <hb...@yahoo.com>.
From: Steven J. McDowall
> 1) I am not sure what to do about the wrong char. set of HTTP vs. http ..
but I don't think that is the
> problem.. The REAL problem is that the namespace of
> HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01
I agree HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01 is the problem,
but case sensitivity is also a (minor) problem with Apache toolkit. It does
case sensitive comparison for http://schemas.xmlsoap.org/soap/envelope/,
that means HTTP://schemas.xmlsoap.org/soap/envelope/ this is not acceptable.
>3) SOAP does not care about namespaces.. HOWEVER. in your example the real
problem is that
>your XML is very mal-formed.. You have "semi-namespaces" which is NOT
allowed in XML..
>Specifically...
><:GetQuote xmlns:="blah blah">
It looks Apache SOAP toolkit cares about namespaces. If SOAP does not care
about namespaces, then there would be a bug with Apache SOAP toolkit.
Apache SOAP toolkit expectes a call to a function help to be like this
<ns:help xmlns:ns="somenamespace">
</ns:help>
this does not seem to be acceptable
<help>
</help>
this is assuming that there is no default namespace defined. MS Examples
seem to send exactly this, without a default namespace.
MS SOAP toolkit is supposed to generate the correct XML. I could not find a
way to make it do that. It generates code like "<:GetQuote xmlns:="blah
blah">", and that is horrible. I could not find a way to make it generate
namespace.
I also could not make it do something like this.
<help xmlns="somenamespace">
</help>
The API calls to ROPE do not seem to be generating this correctly, and I
could not find a way. has anyone tried to use MS SDK and apache toolkit
together ?
Harmeet
----- Original Message -----
From: Steven J. McDowall
Subject: RE: MS and Apache SOAP toolkit
1)
I am not sure what to do about the wrong char. set of HTTP vs. http .. but I
don't think that is the
problem.. The REAL problem is that the namespace of
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01
Does NOT point to a valid URI.. The above URI does not exist and thus there
is no schema for it..
it really should have the value:
HTTP://schemas.xmlsoap.org/soap/envelope/
2) The encodingStyle attribute also is not correct.. (from what I see below)
it should point to the URI
HTTP://schemas.xmlsoap.org/soap/encoding/
3) SOAP does not care about namespaces.. HOWEVER. in your example the real
problem is that
your XML is very mal-formed.. You have "semi-namespaces" which is NOT
allowed in XML..
Specifically...
<:GetQuote xmlns:="blah blah">
Is bad xml.. according to the XML Namespace Standard, you may NOT have an
EMPTY namespace
which is what you have.. Find a way to specify a namespace prefix as
required so it looks like
<somestring:GetQuote xmlsns:somestring="blah blah">
</somestring:GetQuote>
The other option is to have no namespace qualified name...but that looks
like
<GetQuote xmlns="bla blah">
</GetQuote>
So, there appears to be a few issues w/ the MS SDK for Soap that needs to be
fixed unless
you're just invoking it wrong.. :-)
Good luck
-Steve
-----Original Message-----
From: Harmeet Bedi [mailto:harmeet@intraspect.com]
Sent: Saturday, July 22, 2000 12:42 AM
To: SOAP@DISCUSS.DEVELOP.COM; soap-dev@xml.apache.org
Subject: MS and Apache SOAP toolkit
I have been trying to get a Server using Apache SOAP toolkit working with
SOAP SDK from MS.
The MS SDK can be got from
http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/ms
dn-files/027/000/242/msdncompositedoc.xml
Apache SOAP homepage is http://xml.apache.org/soap
Here is what I found
1. MS SDK considers SOAP namespace to be
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01.
Apache wants the namespace to be http://schemas.xmlsoap.org/soap/envelope/.
The latter is correct, but Apache toolkit is a little unforgiving. It
protocol part cannot be HTTP(uppercase). It has to be lowercase
2. There are some namespace issues with the MS SDK. In the SDK, I tried to
set a namespace associated with a function. changed this function in
ROPEDemo Sample
Private Sub btnGetStockQuote_SW_Click()
from
oSOAP.SetPayloadData icREQUEST, "", "GetStockQuote", sRequestStruct
to
oSOAP.SetPayloadData icREQUEST, "some-ns", "GetStockQuote", sRequestStruct
this changed the Request Payload
from
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<GetStockQuote>
<symbol>MSFT</symbol>
<description>any company</description>
</GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
to
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<:GetStockQuote xmlns:="some-ns">
<symbol>MSFT</symbol>
<description>any company</description>
</:GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
Note the ':', before GetStockQuote.
MS SDK, inspite of what the documentation says, seems to make it difficult
to set the Namespace. Maybe there is a way, but I couldn't figure it out in
the last few hours.
If I don't specify a namespace, Apache throws a NullPointerException. Here
is the stack trace
java.lang.NullPointerException
at org.apache.soap.util.xml.QName.setNamespaceURI(QName.java:108)
at org.apache.soap.util.xml.QName.<init>(QName.java:102)
at
org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:231)
at org.apache.soap.Envelope.unmarshall(Envelope.java:213)
Is it mandatory that the function should have a Namespace associated with it
? The examples in specs have namespace associated with function and it seems
the right thing, but what is the official word ? This may indicate that
there is a bug in Apache toolkit or that MS SDK Examples wrong.
would appreciate any pointers/suggestions to get these two toolkits working
together
thanks,
Harmeet
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
Re: MS and Apache SOAP toolkit
Posted by Harmeet Bedi <hb...@yahoo.com>.
From: Steven J. McDowall
> 1) I am not sure what to do about the wrong char. set of HTTP vs. http ..
but I don't think that is the
> problem.. The REAL problem is that the namespace of
> HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01
I agree HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01 is the problem,
but case sensitivity is also a (minor) problem with Apache toolkit. It does
case sensitive comparison for http://schemas.xmlsoap.org/soap/envelope/,
that means HTTP://schemas.xmlsoap.org/soap/envelope/ this is not acceptable.
>3) SOAP does not care about namespaces.. HOWEVER. in your example the real
problem is that
>your XML is very mal-formed.. You have "semi-namespaces" which is NOT
allowed in XML..
>Specifically...
><:GetQuote xmlns:="blah blah">
It looks Apache SOAP toolkit cares about namespaces. If SOAP does not care
about namespaces, then there would be a bug with Apache SOAP toolkit.
Apache SOAP toolkit expectes a call to a function help to be like this
<ns:help xmlns:ns="somenamespace">
</ns:help>
this does not seem to be acceptable
<help>
</help>
this is assuming that there is no default namespace defined. MS Examples
seem to send exactly this, without a default namespace.
MS SOAP toolkit is supposed to generate the correct XML. I could not find a
way to make it do that. It generates code like "<:GetQuote xmlns:="blah
blah">", and that is horrible. I could not find a way to make it generate
namespace.
I also could not make it do something like this.
<help xmlns="somenamespace">
</help>
The API calls to ROPE do not seem to be generating this correctly, and I
could not find a way. has anyone tried to use MS SDK and apache toolkit
together ?
Harmeet
----- Original Message -----
From: Steven J. McDowall
Subject: RE: MS and Apache SOAP toolkit
1)
I am not sure what to do about the wrong char. set of HTTP vs. http .. but I
don't think that is the
problem.. The REAL problem is that the namespace of
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01
Does NOT point to a valid URI.. The above URI does not exist and thus there
is no schema for it..
it really should have the value:
HTTP://schemas.xmlsoap.org/soap/envelope/
2) The encodingStyle attribute also is not correct.. (from what I see below)
it should point to the URI
HTTP://schemas.xmlsoap.org/soap/encoding/
3) SOAP does not care about namespaces.. HOWEVER. in your example the real
problem is that
your XML is very mal-formed.. You have "semi-namespaces" which is NOT
allowed in XML..
Specifically...
<:GetQuote xmlns:="blah blah">
Is bad xml.. according to the XML Namespace Standard, you may NOT have an
EMPTY namespace
which is what you have.. Find a way to specify a namespace prefix as
required so it looks like
<somestring:GetQuote xmlsns:somestring="blah blah">
</somestring:GetQuote>
The other option is to have no namespace qualified name...but that looks
like
<GetQuote xmlns="bla blah">
</GetQuote>
So, there appears to be a few issues w/ the MS SDK for Soap that needs to be
fixed unless
you're just invoking it wrong.. :-)
Good luck
-Steve
-----Original Message-----
From: Harmeet Bedi [mailto:harmeet@intraspect.com]
Sent: Saturday, July 22, 2000 12:42 AM
To: SOAP@DISCUSS.DEVELOP.COM; soap-dev@xml.apache.org
Subject: MS and Apache SOAP toolkit
I have been trying to get a Server using Apache SOAP toolkit working with
SOAP SDK from MS.
The MS SDK can be got from
http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/ms
dn-files/027/000/242/msdncompositedoc.xml
Apache SOAP homepage is http://xml.apache.org/soap
Here is what I found
1. MS SDK considers SOAP namespace to be
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01.
Apache wants the namespace to be http://schemas.xmlsoap.org/soap/envelope/.
The latter is correct, but Apache toolkit is a little unforgiving. It
protocol part cannot be HTTP(uppercase). It has to be lowercase
2. There are some namespace issues with the MS SDK. In the SDK, I tried to
set a namespace associated with a function. changed this function in
ROPEDemo Sample
Private Sub btnGetStockQuote_SW_Click()
from
oSOAP.SetPayloadData icREQUEST, "", "GetStockQuote", sRequestStruct
to
oSOAP.SetPayloadData icREQUEST, "some-ns", "GetStockQuote", sRequestStruct
this changed the Request Payload
from
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<GetStockQuote>
<symbol>MSFT</symbol>
<description>any company</description>
</GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
to
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<:GetStockQuote xmlns:="some-ns">
<symbol>MSFT</symbol>
<description>any company</description>
</:GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
Note the ':', before GetStockQuote.
MS SDK, inspite of what the documentation says, seems to make it difficult
to set the Namespace. Maybe there is a way, but I couldn't figure it out in
the last few hours.
If I don't specify a namespace, Apache throws a NullPointerException. Here
is the stack trace
java.lang.NullPointerException
at org.apache.soap.util.xml.QName.setNamespaceURI(QName.java:108)
at org.apache.soap.util.xml.QName.<init>(QName.java:102)
at
org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:231)
at org.apache.soap.Envelope.unmarshall(Envelope.java:213)
Is it mandatory that the function should have a Namespace associated with it
? The examples in specs have namespace associated with function and it seems
the right thing, but what is the official word ? This may indicate that
there is a bug in Apache toolkit or that MS SDK Examples wrong.
would appreciate any pointers/suggestions to get these two toolkits working
together
thanks,
Harmeet
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
Re: MS and Apache SOAP toolkit
Posted by Simon Fell <so...@zaks.demon.co.uk>.
i didn't really convey what i was thinking very well, the point i was
trying to make is that .net will be MS's main SOAP codebase, and
therefore inter-op with that will be more important. Whilst inter-op
with the current SOAP toolkit would be nice, i have a hard time
imagining that anyone is planning to deploy production systems with
it, IMHO the lack of support for arrays rules out any realistic use.
BTW, count me in for working on the Apache SOAP/C++ version.
Cheers
Simon
On Sat, 22 Jul 2000 23:33:53 -0700, in soap you wrote:
>Yes, the MS Toolkit uses SDL to provide the necessary type information for
>handling the serialization/deserialization. The SDL contains a XML Data
>Reduced Schema. The problem with waiting on the interop issues until .NET
>is that we have no clue when .NET is going to go gold. Yeah, we're hearing
>mid next year... but I can't help recall that W2K was "due out next year"
>for about two/three years. Some of us can't wait that long. Once all of
>the bugs are fixed in the MS Toolkit, this data type issue is the last
>hurdle to make the SOAP4J code work out of the box with the MS SOAP code. I
>think that will the SOAP4J's ability to map datatypes in the deployment
>descriptor, this should turn out to be a fairly easy task, don't ya think?
>
>- James
>
>-----Original Message-----
>From: Simon Fell [mailto:soap@zaks.demon.co.uk]
>Sent: Saturday, July 22, 2000 10:08 PM
>To: soap-dev@xml.apache.org
>Subject: Re: MS and Apache SOAP toolkit
>
>
>On Sun, 23 Jul 2000 00:06:18 -0400, in soap you wrote:
>
>>So how does the MS SOAP toolkit "know" what the type of an
>>element is? Does it assume that a schema is always present?
>>
>>We could adopt the convention that if an element's type isn't
>>specified and no schema is available to determine a type, then
>>the type of the element is opaque, but it is named the same
>>as the QName of the element. The net effect is that as long
>>as a serializer/deserializer is avaialable to map the qname
>>of the element to a Java type and back we're ok. Would such
>>a convention work to make the interop story work??
>>
>>Sanjiva.
>
>By the looks of things, it uses the info from the SDL to control the
>element types. I believe (but could well be wrong) that it this is not
>an actual XML Schema description.
>
>I wouldn't be too worried about inter-op with the current soap toolkit
>as its obvious from the PDC that the real MS SOAP implementation is
>the one in .NET, which from the traffic on the dotnet list seems to be
>pretty complete (it has support for multi-ref accessors). I'm hoping
>to get some time next week to have a real look at it.
>
>Cheers
>Simon
Re: MS and Apache SOAP toolkit
Posted by Simon Fell <so...@zaks.demon.co.uk>.
i didn't really convey what i was thinking very well, the point i was
trying to make is that .net will be MS's main SOAP codebase, and
therefore inter-op with that will be more important. Whilst inter-op
with the current SOAP toolkit would be nice, i have a hard time
imagining that anyone is planning to deploy production systems with
it, IMHO the lack of support for arrays rules out any realistic use.
BTW, count me in for working on the Apache SOAP/C++ version.
Cheers
Simon
On Sat, 22 Jul 2000 23:33:53 -0700, in soap you wrote:
>Yes, the MS Toolkit uses SDL to provide the necessary type information for
>handling the serialization/deserialization. The SDL contains a XML Data
>Reduced Schema. The problem with waiting on the interop issues until .NET
>is that we have no clue when .NET is going to go gold. Yeah, we're hearing
>mid next year... but I can't help recall that W2K was "due out next year"
>for about two/three years. Some of us can't wait that long. Once all of
>the bugs are fixed in the MS Toolkit, this data type issue is the last
>hurdle to make the SOAP4J code work out of the box with the MS SOAP code. I
>think that will the SOAP4J's ability to map datatypes in the deployment
>descriptor, this should turn out to be a fairly easy task, don't ya think?
>
>- James
>
>-----Original Message-----
>From: Simon Fell [mailto:soap@zaks.demon.co.uk]
>Sent: Saturday, July 22, 2000 10:08 PM
>To: soap-dev@xml.apache.org
>Subject: Re: MS and Apache SOAP toolkit
>
>
>On Sun, 23 Jul 2000 00:06:18 -0400, in soap you wrote:
>
>>So how does the MS SOAP toolkit "know" what the type of an
>>element is? Does it assume that a schema is always present?
>>
>>We could adopt the convention that if an element's type isn't
>>specified and no schema is available to determine a type, then
>>the type of the element is opaque, but it is named the same
>>as the QName of the element. The net effect is that as long
>>as a serializer/deserializer is avaialable to map the qname
>>of the element to a Java type and back we're ok. Would such
>>a convention work to make the interop story work??
>>
>>Sanjiva.
>
>By the looks of things, it uses the info from the SDL to control the
>element types. I believe (but could well be wrong) that it this is not
>an actual XML Schema description.
>
>I wouldn't be too worried about inter-op with the current soap toolkit
>as its obvious from the PDC that the real MS SOAP implementation is
>the one in .NET, which from the traffic on the dotnet list seems to be
>pretty complete (it has support for multi-ref accessors). I'm hoping
>to get some time next week to have a real look at it.
>
>Cheers
>Simon
RE: MS and Apache SOAP toolkit
Posted by James Snell <js...@lemoorenet.com>.
Yes, the MS Toolkit uses SDL to provide the necessary type information for
handling the serialization/deserialization. The SDL contains a XML Data
Reduced Schema. The problem with waiting on the interop issues until .NET
is that we have no clue when .NET is going to go gold. Yeah, we're hearing
mid next year... but I can't help recall that W2K was "due out next year"
for about two/three years. Some of us can't wait that long. Once all of
the bugs are fixed in the MS Toolkit, this data type issue is the last
hurdle to make the SOAP4J code work out of the box with the MS SOAP code. I
think that will the SOAP4J's ability to map datatypes in the deployment
descriptor, this should turn out to be a fairly easy task, don't ya think?
- James
-----Original Message-----
From: Simon Fell [mailto:soap@zaks.demon.co.uk]
Sent: Saturday, July 22, 2000 10:08 PM
To: soap-dev@xml.apache.org
Subject: Re: MS and Apache SOAP toolkit
On Sun, 23 Jul 2000 00:06:18 -0400, in soap you wrote:
>So how does the MS SOAP toolkit "know" what the type of an
>element is? Does it assume that a schema is always present?
>
>We could adopt the convention that if an element's type isn't
>specified and no schema is available to determine a type, then
>the type of the element is opaque, but it is named the same
>as the QName of the element. The net effect is that as long
>as a serializer/deserializer is avaialable to map the qname
>of the element to a Java type and back we're ok. Would such
>a convention work to make the interop story work??
>
>Sanjiva.
By the looks of things, it uses the info from the SDL to control the
element types. I believe (but could well be wrong) that it this is not
an actual XML Schema description.
I wouldn't be too worried about inter-op with the current soap toolkit
as its obvious from the PDC that the real MS SOAP implementation is
the one in .NET, which from the traffic on the dotnet list seems to be
pretty complete (it has support for multi-ref accessors). I'm hoping
to get some time next week to have a real look at it.
Cheers
Simon
RE: MS and Apache SOAP toolkit
Posted by James Snell <js...@lemoorenet.com>.
Yes, the MS Toolkit uses SDL to provide the necessary type information for
handling the serialization/deserialization. The SDL contains a XML Data
Reduced Schema. The problem with waiting on the interop issues until .NET
is that we have no clue when .NET is going to go gold. Yeah, we're hearing
mid next year... but I can't help recall that W2K was "due out next year"
for about two/three years. Some of us can't wait that long. Once all of
the bugs are fixed in the MS Toolkit, this data type issue is the last
hurdle to make the SOAP4J code work out of the box with the MS SOAP code. I
think that will the SOAP4J's ability to map datatypes in the deployment
descriptor, this should turn out to be a fairly easy task, don't ya think?
- James
-----Original Message-----
From: Simon Fell [mailto:soap@zaks.demon.co.uk]
Sent: Saturday, July 22, 2000 10:08 PM
To: soap-dev@xml.apache.org
Subject: Re: MS and Apache SOAP toolkit
On Sun, 23 Jul 2000 00:06:18 -0400, in soap you wrote:
>So how does the MS SOAP toolkit "know" what the type of an
>element is? Does it assume that a schema is always present?
>
>We could adopt the convention that if an element's type isn't
>specified and no schema is available to determine a type, then
>the type of the element is opaque, but it is named the same
>as the QName of the element. The net effect is that as long
>as a serializer/deserializer is avaialable to map the qname
>of the element to a Java type and back we're ok. Would such
>a convention work to make the interop story work??
>
>Sanjiva.
By the looks of things, it uses the info from the SDL to control the
element types. I believe (but could well be wrong) that it this is not
an actual XML Schema description.
I wouldn't be too worried about inter-op with the current soap toolkit
as its obvious from the PDC that the real MS SOAP implementation is
the one in .NET, which from the traffic on the dotnet list seems to be
pretty complete (it has support for multi-ref accessors). I'm hoping
to get some time next week to have a real look at it.
Cheers
Simon
Re: MS and Apache SOAP toolkit
Posted by Simon Fell <so...@zaks.demon.co.uk>.
On Sun, 23 Jul 2000 00:06:18 -0400, in soap you wrote:
>So how does the MS SOAP toolkit "know" what the type of an
>element is? Does it assume that a schema is always present?
>
>We could adopt the convention that if an element's type isn't
>specified and no schema is available to determine a type, then
>the type of the element is opaque, but it is named the same
>as the QName of the element. The net effect is that as long
>as a serializer/deserializer is avaialable to map the qname
>of the element to a Java type and back we're ok. Would such
>a convention work to make the interop story work??
>
>Sanjiva.
By the looks of things, it uses the info from the SDL to control the
element types. I believe (but could well be wrong) that it this is not
an actual XML Schema description.
I wouldn't be too worried about inter-op with the current soap toolkit
as its obvious from the PDC that the real MS SOAP implementation is
the one in .NET, which from the traffic on the dotnet list seems to be
pretty complete (it has support for multi-ref accessors). I'm hoping
to get some time next week to have a real look at it.
Cheers
Simon
Re: MS and Apache SOAP toolkit
Posted by Simon Fell <so...@zaks.demon.co.uk>.
On Sun, 23 Jul 2000 00:06:18 -0400, in soap you wrote:
>So how does the MS SOAP toolkit "know" what the type of an
>element is? Does it assume that a schema is always present?
>
>We could adopt the convention that if an element's type isn't
>specified and no schema is available to determine a type, then
>the type of the element is opaque, but it is named the same
>as the QName of the element. The net effect is that as long
>as a serializer/deserializer is avaialable to map the qname
>of the element to a Java type and back we're ok. Would such
>a convention work to make the interop story work??
>
>Sanjiva.
By the looks of things, it uses the info from the SDL to control the
element types. I believe (but could well be wrong) that it this is not
an actual XML Schema description.
I wouldn't be too worried about inter-op with the current soap toolkit
as its obvious from the PDC that the real MS SOAP implementation is
the one in .NET, which from the traffic on the dotnet list seems to be
pretty complete (it has support for multi-ref accessors). I'm hoping
to get some time next week to have a real look at it.
Cheers
Simon
Re: MS and Apache SOAP toolkit
Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
So how does the MS SOAP toolkit "know" what the type of an
element is? Does it assume that a schema is always present?
We could adopt the convention that if an element's type isn't
specified and no schema is available to determine a type, then
the type of the element is opaque, but it is named the same
as the QName of the element. The net effect is that as long
as a serializer/deserializer is avaialable to map the qname
of the element to a Java type and back we're ok. Would such
a convention work to make the interop story work??
Sanjiva.
----- Original Message -----
From: James Snell
To: soap-dev@xml.apache.org ; sjmcdowall@uswest.net
Sent: Saturday, July 22, 2000 7:11 PM
Subject: RE: MS and Apache SOAP toolkit
As an FYI... the SOAP Toolkit will be updated in the very near future with fixes for these issues. There is however one additional piece of the MS SOAP -> IBM/APACHE SOAP interop problem that is not just Microsoft's problem. SOAP For Java requires that all parameters include an XSD data type. The SOAP specification makes this optional, so the Microsoft code doesn't enforce it (doesn't even support it at this time).
- James
-----Original Message-----
From: Steven J. McDowall [mailto:sjmcdowall@uswest.net]
Sent: Saturday, July 22, 2000 5:18 AM
To: soap-dev@xml.apache.org; SOAP@DISCUSS.DEVELOP.COM
Subject: RE: MS and Apache SOAP toolkit
1)
I am not sure what to do about the wrong char. set of HTTP vs. http .. but I don't think that is the
problem.. The REAL problem is that the namespace of
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01
Does NOT point to a valid URI.. The above URI does not exist and thus there is no schema for it..
it really should have the value:
HTTP://schemas.xmlsoap.org/soap/envelope/
2) The encodingStyle attribute also is not correct.. (from what I see below) it should point to the URI
HTTP://schemas.xmlsoap.org/soap/encoding/
3) SOAP does not care about namespaces.. HOWEVER. in your example the real problem is that
your XML is very mal-formed.. You have "semi-namespaces" which is NOT allowed in XML..
Specifically...
<:GetQuote xmlns:="blah blah">
Is bad xml.. according to the XML Namespace Standard, you may NOT have an EMPTY namespace
which is what you have.. Find a way to specify a namespace prefix as required so it looks like
<somestring:GetQuote xmlsns:somestring="blah blah">
</somestring:GetQuote>
The other option is to have no namespace qualified name...but that looks like
<GetQuote xmlns="bla blah">
</GetQuote>
So, there appears to be a few issues w/ the MS SDK for Soap that needs to be fixed unless
you're just invoking it wrong.. :-)
Good luck
-Steve
-----Original Message-----
From: Harmeet Bedi [mailto:harmeet@intraspect.com]
Sent: Saturday, July 22, 2000 12:42 AM
To: SOAP@DISCUSS.DEVELOP.COM; soap-dev@xml.apache.org
Subject: MS and Apache SOAP toolkit
I have been trying to get a Server using Apache SOAP toolkit working with SOAP SDK from MS.
The MS SDK can be got from http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/msdn-files/027/000/242/msdncompositedoc.xml
Apache SOAP homepage is http://xml.apache.org/soap
Here is what I found
1. MS SDK considers SOAP namespace to be HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01.
Apache wants the namespace to be http://schemas.xmlsoap.org/soap/envelope/. The latter is correct, but Apache toolkit is a little unforgiving. It protocol part cannot be HTTP(uppercase). It has to be lowercase
2. There are some namespace issues with the MS SDK. In the SDK, I tried to set a namespace associated with a function. changed this function in ROPEDemo Sample
Private Sub btnGetStockQuote_SW_Click()
from
oSOAP.SetPayloadData icREQUEST, "", "GetStockQuote", sRequestStruct
to
oSOAP.SetPayloadData icREQUEST, "some-ns", "GetStockQuote", sRequestStruct
this changed the Request Payload
from
<?xml version="1.0"?>
<SOAP:Envelope xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01" encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<GetStockQuote>
<symbol>MSFT</symbol>
<description>any company</description>
</GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
to
<?xml version="1.0"?>
<SOAP:Envelope xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01" encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<:GetStockQuote xmlns:="some-ns">
<symbol>MSFT</symbol>
<description>any company</description>
</:GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
Note the ':', before GetStockQuote.
MS SDK, inspite of what the documentation says, seems to make it difficult to set the Namespace. Maybe there is a way, but I couldn't figure it out in the last few hours.
If I don't specify a namespace, Apache throws a NullPointerException. Here is the stack trace
java.lang.NullPointerException
at org.apache.soap.util.xml.QName.setNamespaceURI(QName.java:108)
at org.apache.soap.util.xml.QName.<init>(QName.java:102)
at org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:231)
at org.apache.soap.Envelope.unmarshall(Envelope.java:213)
Is it mandatory that the function should have a Namespace associated with it ? The examples in specs have namespace associated with function and it seems the right thing, but what is the official word ? This may indicate that there is a bug in Apache toolkit or that MS SDK Examples wrong.
would appreciate any pointers/suggestions to get these two toolkits working together
thanks,
Harmeet
Re: MS and Apache SOAP toolkit
Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
So how does the MS SOAP toolkit "know" what the type of an
element is? Does it assume that a schema is always present?
We could adopt the convention that if an element's type isn't
specified and no schema is available to determine a type, then
the type of the element is opaque, but it is named the same
as the QName of the element. The net effect is that as long
as a serializer/deserializer is avaialable to map the qname
of the element to a Java type and back we're ok. Would such
a convention work to make the interop story work??
Sanjiva.
----- Original Message -----
From: James Snell
To: soap-dev@xml.apache.org ; sjmcdowall@uswest.net
Sent: Saturday, July 22, 2000 7:11 PM
Subject: RE: MS and Apache SOAP toolkit
As an FYI... the SOAP Toolkit will be updated in the very near future with fixes for these issues. There is however one additional piece of the MS SOAP -> IBM/APACHE SOAP interop problem that is not just Microsoft's problem. SOAP For Java requires that all parameters include an XSD data type. The SOAP specification makes this optional, so the Microsoft code doesn't enforce it (doesn't even support it at this time).
- James
-----Original Message-----
From: Steven J. McDowall [mailto:sjmcdowall@uswest.net]
Sent: Saturday, July 22, 2000 5:18 AM
To: soap-dev@xml.apache.org; SOAP@DISCUSS.DEVELOP.COM
Subject: RE: MS and Apache SOAP toolkit
1)
I am not sure what to do about the wrong char. set of HTTP vs. http .. but I don't think that is the
problem.. The REAL problem is that the namespace of
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01
Does NOT point to a valid URI.. The above URI does not exist and thus there is no schema for it..
it really should have the value:
HTTP://schemas.xmlsoap.org/soap/envelope/
2) The encodingStyle attribute also is not correct.. (from what I see below) it should point to the URI
HTTP://schemas.xmlsoap.org/soap/encoding/
3) SOAP does not care about namespaces.. HOWEVER. in your example the real problem is that
your XML is very mal-formed.. You have "semi-namespaces" which is NOT allowed in XML..
Specifically...
<:GetQuote xmlns:="blah blah">
Is bad xml.. according to the XML Namespace Standard, you may NOT have an EMPTY namespace
which is what you have.. Find a way to specify a namespace prefix as required so it looks like
<somestring:GetQuote xmlsns:somestring="blah blah">
</somestring:GetQuote>
The other option is to have no namespace qualified name...but that looks like
<GetQuote xmlns="bla blah">
</GetQuote>
So, there appears to be a few issues w/ the MS SDK for Soap that needs to be fixed unless
you're just invoking it wrong.. :-)
Good luck
-Steve
-----Original Message-----
From: Harmeet Bedi [mailto:harmeet@intraspect.com]
Sent: Saturday, July 22, 2000 12:42 AM
To: SOAP@DISCUSS.DEVELOP.COM; soap-dev@xml.apache.org
Subject: MS and Apache SOAP toolkit
I have been trying to get a Server using Apache SOAP toolkit working with SOAP SDK from MS.
The MS SDK can be got from http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/msdn-files/027/000/242/msdncompositedoc.xml
Apache SOAP homepage is http://xml.apache.org/soap
Here is what I found
1. MS SDK considers SOAP namespace to be HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01.
Apache wants the namespace to be http://schemas.xmlsoap.org/soap/envelope/. The latter is correct, but Apache toolkit is a little unforgiving. It protocol part cannot be HTTP(uppercase). It has to be lowercase
2. There are some namespace issues with the MS SDK. In the SDK, I tried to set a namespace associated with a function. changed this function in ROPEDemo Sample
Private Sub btnGetStockQuote_SW_Click()
from
oSOAP.SetPayloadData icREQUEST, "", "GetStockQuote", sRequestStruct
to
oSOAP.SetPayloadData icREQUEST, "some-ns", "GetStockQuote", sRequestStruct
this changed the Request Payload
from
<?xml version="1.0"?>
<SOAP:Envelope xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01" encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<GetStockQuote>
<symbol>MSFT</symbol>
<description>any company</description>
</GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
to
<?xml version="1.0"?>
<SOAP:Envelope xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01" encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<:GetStockQuote xmlns:="some-ns">
<symbol>MSFT</symbol>
<description>any company</description>
</:GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
Note the ':', before GetStockQuote.
MS SDK, inspite of what the documentation says, seems to make it difficult to set the Namespace. Maybe there is a way, but I couldn't figure it out in the last few hours.
If I don't specify a namespace, Apache throws a NullPointerException. Here is the stack trace
java.lang.NullPointerException
at org.apache.soap.util.xml.QName.setNamespaceURI(QName.java:108)
at org.apache.soap.util.xml.QName.<init>(QName.java:102)
at org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:231)
at org.apache.soap.Envelope.unmarshall(Envelope.java:213)
Is it mandatory that the function should have a Namespace associated with it ? The examples in specs have namespace associated with function and it seems the right thing, but what is the official word ? This may indicate that there is a bug in Apache toolkit or that MS SDK Examples wrong.
would appreciate any pointers/suggestions to get these two toolkits working together
thanks,
Harmeet
RE: MS and Apache SOAP toolkit
Posted by James Snell <js...@lemoorenet.com>.
As an FYI... the SOAP Toolkit will be updated in the very near future with
fixes for these issues. There is however one additional piece of the MS
SOAP -> IBM/APACHE SOAP interop problem that is not just Microsoft's
problem. SOAP For Java requires that all parameters include an XSD data
type. The SOAP specification makes this optional, so the Microsoft code
doesn't enforce it (doesn't even support it at this time).
- James
-----Original Message-----
From: Steven J. McDowall [mailto:sjmcdowall@uswest.net]
Sent: Saturday, July 22, 2000 5:18 AM
To: soap-dev@xml.apache.org; SOAP@DISCUSS.DEVELOP.COM
Subject: RE: MS and Apache SOAP toolkit
1)
I am not sure what to do about the wrong char. set of HTTP vs. http .. but
I don't think that is the
problem.. The REAL problem is that the namespace of
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01
Does NOT point to a valid URI.. The above URI does not exist and thus
there is no schema for it..
it really should have the value:
HTTP://schemas.xmlsoap.org/soap/envelope/
2) The encodingStyle attribute also is not correct.. (from what I see
below) it should point to the URI
HTTP://schemas.xmlsoap.org/soap/encoding/
3) SOAP does not care about namespaces.. HOWEVER. in your example the real
problem is that
your XML is very mal-formed.. You have "semi-namespaces" which is NOT
allowed in XML..
Specifically...
<:GetQuote xmlns:="blah blah">
Is bad xml.. according to the XML Namespace Standard, you may NOT have an
EMPTY namespace
which is what you have.. Find a way to specify a namespace prefix as
required so it looks like
<somestring:GetQuote xmlsns:somestring="blah blah">
</somestring:GetQuote>
The other option is to have no namespace qualified name...but that looks
like
<GetQuote xmlns="bla blah">
</GetQuote>
So, there appears to be a few issues w/ the MS SDK for Soap that needs to
be fixed unless
you're just invoking it wrong.. :-)
Good luck
-Steve
-----Original Message-----
From: Harmeet Bedi [mailto:harmeet@intraspect.com]
Sent: Saturday, July 22, 2000 12:42 AM
To: SOAP@DISCUSS.DEVELOP.COM; soap-dev@xml.apache.org
Subject: MS and Apache SOAP toolkit
I have been trying to get a Server using Apache SOAP toolkit working
with SOAP SDK from MS.
The MS SDK can be got from
http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/ms
dn-files/027/000/242/msdncompositedoc.xml
Apache SOAP homepage is http://xml.apache.org/soap
Here is what I found
1. MS SDK considers SOAP namespace to be
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01.
Apache wants the namespace to be
http://schemas.xmlsoap.org/soap/envelope/. The latter is correct, but Apache
toolkit is a little unforgiving. It protocol part cannot be HTTP(uppercase).
It has to be lowercase
2. There are some namespace issues with the MS SDK. In the SDK, I tried
to set a namespace associated with a function. changed this function in
ROPEDemo Sample
Private Sub btnGetStockQuote_SW_Click()
from
oSOAP.SetPayloadData icREQUEST, "", "GetStockQuote", sRequestStruct
to
oSOAP.SetPayloadData icREQUEST, "some-ns", "GetStockQuote",
sRequestStruct
this changed the Request Payload
from
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<GetStockQuote>
<symbol>MSFT</symbol>
<description>any company</description>
</GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
to
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<:GetStockQuote xmlns:="some-ns">
<symbol>MSFT</symbol>
<description>any company</description>
</:GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
Note the ':', before GetStockQuote.
MS SDK, inspite of what the documentation says, seems to make it
difficult to set the Namespace. Maybe there is a way, but I couldn't figure
it out in the last few hours.
If I don't specify a namespace, Apache throws a NullPointerException.
Here is the stack trace
java.lang.NullPointerException
at
org.apache.soap.util.xml.QName.setNamespaceURI(QName.java:108)
at org.apache.soap.util.xml.QName.<init>(QName.java:102)
at
org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:231)
at org.apache.soap.Envelope.unmarshall(Envelope.java:213)
Is it mandatory that the function should have a Namespace associated
with it ? The examples in specs have namespace associated with function and
it seems the right thing, but what is the official word ? This may indicate
that there is a bug in Apache toolkit or that MS SDK Examples wrong.
would appreciate any pointers/suggestions to get these two toolkits
working together
thanks,
Harmeet
RE: MS and Apache SOAP toolkit
Posted by James Snell <js...@lemoorenet.com>.
As an FYI... the SOAP Toolkit will be updated in the very near future with
fixes for these issues. There is however one additional piece of the MS
SOAP -> IBM/APACHE SOAP interop problem that is not just Microsoft's
problem. SOAP For Java requires that all parameters include an XSD data
type. The SOAP specification makes this optional, so the Microsoft code
doesn't enforce it (doesn't even support it at this time).
- James
-----Original Message-----
From: Steven J. McDowall [mailto:sjmcdowall@uswest.net]
Sent: Saturday, July 22, 2000 5:18 AM
To: soap-dev@xml.apache.org; SOAP@DISCUSS.DEVELOP.COM
Subject: RE: MS and Apache SOAP toolkit
1)
I am not sure what to do about the wrong char. set of HTTP vs. http .. but
I don't think that is the
problem.. The REAL problem is that the namespace of
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01
Does NOT point to a valid URI.. The above URI does not exist and thus
there is no schema for it..
it really should have the value:
HTTP://schemas.xmlsoap.org/soap/envelope/
2) The encodingStyle attribute also is not correct.. (from what I see
below) it should point to the URI
HTTP://schemas.xmlsoap.org/soap/encoding/
3) SOAP does not care about namespaces.. HOWEVER. in your example the real
problem is that
your XML is very mal-formed.. You have "semi-namespaces" which is NOT
allowed in XML..
Specifically...
<:GetQuote xmlns:="blah blah">
Is bad xml.. according to the XML Namespace Standard, you may NOT have an
EMPTY namespace
which is what you have.. Find a way to specify a namespace prefix as
required so it looks like
<somestring:GetQuote xmlsns:somestring="blah blah">
</somestring:GetQuote>
The other option is to have no namespace qualified name...but that looks
like
<GetQuote xmlns="bla blah">
</GetQuote>
So, there appears to be a few issues w/ the MS SDK for Soap that needs to
be fixed unless
you're just invoking it wrong.. :-)
Good luck
-Steve
-----Original Message-----
From: Harmeet Bedi [mailto:harmeet@intraspect.com]
Sent: Saturday, July 22, 2000 12:42 AM
To: SOAP@DISCUSS.DEVELOP.COM; soap-dev@xml.apache.org
Subject: MS and Apache SOAP toolkit
I have been trying to get a Server using Apache SOAP toolkit working
with SOAP SDK from MS.
The MS SDK can be got from
http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/ms
dn-files/027/000/242/msdncompositedoc.xml
Apache SOAP homepage is http://xml.apache.org/soap
Here is what I found
1. MS SDK considers SOAP namespace to be
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01.
Apache wants the namespace to be
http://schemas.xmlsoap.org/soap/envelope/. The latter is correct, but Apache
toolkit is a little unforgiving. It protocol part cannot be HTTP(uppercase).
It has to be lowercase
2. There are some namespace issues with the MS SDK. In the SDK, I tried
to set a namespace associated with a function. changed this function in
ROPEDemo Sample
Private Sub btnGetStockQuote_SW_Click()
from
oSOAP.SetPayloadData icREQUEST, "", "GetStockQuote", sRequestStruct
to
oSOAP.SetPayloadData icREQUEST, "some-ns", "GetStockQuote",
sRequestStruct
this changed the Request Payload
from
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<GetStockQuote>
<symbol>MSFT</symbol>
<description>any company</description>
</GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
to
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<:GetStockQuote xmlns:="some-ns">
<symbol>MSFT</symbol>
<description>any company</description>
</:GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
Note the ':', before GetStockQuote.
MS SDK, inspite of what the documentation says, seems to make it
difficult to set the Namespace. Maybe there is a way, but I couldn't figure
it out in the last few hours.
If I don't specify a namespace, Apache throws a NullPointerException.
Here is the stack trace
java.lang.NullPointerException
at
org.apache.soap.util.xml.QName.setNamespaceURI(QName.java:108)
at org.apache.soap.util.xml.QName.<init>(QName.java:102)
at
org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:231)
at org.apache.soap.Envelope.unmarshall(Envelope.java:213)
Is it mandatory that the function should have a Namespace associated
with it ? The examples in specs have namespace associated with function and
it seems the right thing, but what is the official word ? This may indicate
that there is a bug in Apache toolkit or that MS SDK Examples wrong.
would appreciate any pointers/suggestions to get these two toolkits
working together
thanks,
Harmeet
RE: MS and Apache SOAP toolkit
Posted by "Steven J. McDowall" <sj...@uswest.net>.
1)
I am not sure what to do about the wrong char. set of HTTP vs. http .. but I
don't think that is the
problem.. The REAL problem is that the namespace of
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01
Does NOT point to a valid URI.. The above URI does not exist and thus there
is no schema for it..
it really should have the value:
HTTP://schemas.xmlsoap.org/soap/envelope/
2) The encodingStyle attribute also is not correct.. (from what I see below)
it should point to the URI
HTTP://schemas.xmlsoap.org/soap/encoding/
3) SOAP does not care about namespaces.. HOWEVER. in your example the real
problem is that
your XML is very mal-formed.. You have "semi-namespaces" which is NOT
allowed in XML..
Specifically...
<:GetQuote xmlns:="blah blah">
Is bad xml.. according to the XML Namespace Standard, you may NOT have an
EMPTY namespace
which is what you have.. Find a way to specify a namespace prefix as
required so it looks like
<somestring:GetQuote xmlsns:somestring="blah blah">
</somestring:GetQuote>
The other option is to have no namespace qualified name...but that looks
like
<GetQuote xmlns="bla blah">
</GetQuote>
So, there appears to be a few issues w/ the MS SDK for Soap that needs to be
fixed unless
you're just invoking it wrong.. :-)
Good luck
-Steve
-----Original Message-----
From: Harmeet Bedi [mailto:harmeet@intraspect.com]
Sent: Saturday, July 22, 2000 12:42 AM
To: SOAP@DISCUSS.DEVELOP.COM; soap-dev@xml.apache.org
Subject: MS and Apache SOAP toolkit
I have been trying to get a Server using Apache SOAP toolkit working with
SOAP SDK from MS.
The MS SDK can be got from
http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/ms
dn-files/027/000/242/msdncompositedoc.xml
Apache SOAP homepage is http://xml.apache.org/soap
Here is what I found
1. MS SDK considers SOAP namespace to be
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01.
Apache wants the namespace to be
http://schemas.xmlsoap.org/soap/envelope/. The latter is correct, but Apache
toolkit is a little unforgiving. It protocol part cannot be HTTP(uppercase).
It has to be lowercase
2. There are some namespace issues with the MS SDK. In the SDK, I tried to
set a namespace associated with a function. changed this function in
ROPEDemo Sample
Private Sub btnGetStockQuote_SW_Click()
from
oSOAP.SetPayloadData icREQUEST, "", "GetStockQuote", sRequestStruct
to
oSOAP.SetPayloadData icREQUEST, "some-ns", "GetStockQuote", sRequestStruct
this changed the Request Payload
from
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<GetStockQuote>
<symbol>MSFT</symbol>
<description>any company</description>
</GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
to
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<:GetStockQuote xmlns:="some-ns">
<symbol>MSFT</symbol>
<description>any company</description>
</:GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
Note the ':', before GetStockQuote.
MS SDK, inspite of what the documentation says, seems to make it difficult
to set the Namespace. Maybe there is a way, but I couldn't figure it out in
the last few hours.
If I don't specify a namespace, Apache throws a NullPointerException. Here
is the stack trace
java.lang.NullPointerException
at org.apache.soap.util.xml.QName.setNamespaceURI(QName.java:108)
at org.apache.soap.util.xml.QName.<init>(QName.java:102)
at
org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:231)
at org.apache.soap.Envelope.unmarshall(Envelope.java:213)
Is it mandatory that the function should have a Namespace associated with
it ? The examples in specs have namespace associated with function and it
seems the right thing, but what is the official word ? This may indicate
that there is a bug in Apache toolkit or that MS SDK Examples wrong.
would appreciate any pointers/suggestions to get these two toolkits
working together
thanks,
Harmeet
RE: MS and Apache SOAP toolkit
Posted by "Steven J. McDowall" <sj...@uswest.net>.
1)
I am not sure what to do about the wrong char. set of HTTP vs. http .. but I
don't think that is the
problem.. The REAL problem is that the namespace of
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01
Does NOT point to a valid URI.. The above URI does not exist and thus there
is no schema for it..
it really should have the value:
HTTP://schemas.xmlsoap.org/soap/envelope/
2) The encodingStyle attribute also is not correct.. (from what I see below)
it should point to the URI
HTTP://schemas.xmlsoap.org/soap/encoding/
3) SOAP does not care about namespaces.. HOWEVER. in your example the real
problem is that
your XML is very mal-formed.. You have "semi-namespaces" which is NOT
allowed in XML..
Specifically...
<:GetQuote xmlns:="blah blah">
Is bad xml.. according to the XML Namespace Standard, you may NOT have an
EMPTY namespace
which is what you have.. Find a way to specify a namespace prefix as
required so it looks like
<somestring:GetQuote xmlsns:somestring="blah blah">
</somestring:GetQuote>
The other option is to have no namespace qualified name...but that looks
like
<GetQuote xmlns="bla blah">
</GetQuote>
So, there appears to be a few issues w/ the MS SDK for Soap that needs to be
fixed unless
you're just invoking it wrong.. :-)
Good luck
-Steve
-----Original Message-----
From: Harmeet Bedi [mailto:harmeet@intraspect.com]
Sent: Saturday, July 22, 2000 12:42 AM
To: SOAP@DISCUSS.DEVELOP.COM; soap-dev@xml.apache.org
Subject: MS and Apache SOAP toolkit
I have been trying to get a Server using Apache SOAP toolkit working with
SOAP SDK from MS.
The MS SDK can be got from
http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/ms
dn-files/027/000/242/msdncompositedoc.xml
Apache SOAP homepage is http://xml.apache.org/soap
Here is what I found
1. MS SDK considers SOAP namespace to be
HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01.
Apache wants the namespace to be
http://schemas.xmlsoap.org/soap/envelope/. The latter is correct, but Apache
toolkit is a little unforgiving. It protocol part cannot be HTTP(uppercase).
It has to be lowercase
2. There are some namespace issues with the MS SDK. In the SDK, I tried to
set a namespace associated with a function. changed this function in
ROPEDemo Sample
Private Sub btnGetStockQuote_SW_Click()
from
oSOAP.SetPayloadData icREQUEST, "", "GetStockQuote", sRequestStruct
to
oSOAP.SetPayloadData icREQUEST, "some-ns", "GetStockQuote", sRequestStruct
this changed the Request Payload
from
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<GetStockQuote>
<symbol>MSFT</symbol>
<description>any company</description>
</GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
to
<?xml version="1.0"?>
<SOAP:Envelope
xmlns:SOAP="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01"
encodingStyle="HTTP://schemas.xmlsoap.org/soap/envelope/2000-03-01">
<SOAP:Body>
<:GetStockQuote xmlns:="some-ns">
<symbol>MSFT</symbol>
<description>any company</description>
</:GetStockQuote>
</SOAP:Body>
</SOAP:Envelope>
Note the ':', before GetStockQuote.
MS SDK, inspite of what the documentation says, seems to make it difficult
to set the Namespace. Maybe there is a way, but I couldn't figure it out in
the last few hours.
If I don't specify a namespace, Apache throws a NullPointerException. Here
is the stack trace
java.lang.NullPointerException
at org.apache.soap.util.xml.QName.setNamespaceURI(QName.java:108)
at org.apache.soap.util.xml.QName.<init>(QName.java:102)
at
org.apache.soap.AttributeHandler.unmarshall(AttributeHandler.java:231)
at org.apache.soap.Envelope.unmarshall(Envelope.java:213)
Is it mandatory that the function should have a Namespace associated with
it ? The examples in specs have namespace associated with function and it
seems the right thing, but what is the official word ? This may indicate
that there is a bug in Apache toolkit or that MS SDK Examples wrong.
would appreciate any pointers/suggestions to get these two toolkits
working together
thanks,
Harmeet