You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by "Matthew J. Duftler" <du...@watson.ibm.com> on 2001/05/23 18:32:00 UTC

Works fine with Xerces v1.4.0!

Hi All,

I just tried most of the samples with Xerces v1.4.0, both on the client and
the server, and they worked fine. It appears the namespace-handling bug fix
is indeed in v1.4.0.

Thanks,
-Matt


RE: Works fine with Xerces v1.4.0! (Problems)

Posted by "Matthew J. Duftler" <du...@watson.ibm.com>.
Hi Jim,

I tried your code below, and it worked fine for me. I am working with Xerces
v1.4.0.

The code I used:

package samples.jh;

import java.io.*;
import javax.xml.parsers.*;
import org.apache.soap.*;
import org.apache.soap.encoding.*;
import org.apache.soap.rpc.*;
import org.apache.soap.server.*;
import org.apache.soap.transport.*;
import org.apache.soap.util.*;
import org.apache.soap.util.xml.*;

public class TestRead
{
  public static void main(String[] argv) throws Exception
  {
    // MJD - debug
    FileReader fr = new FileReader(argv[0]);
    DocumentBuilder _documentBuilder = XMLParserUtils.getXMLDocBuilder();
    Envelope envelope = null;
    Response resp = null;
    SOAPContext sc = new SOAPContext();
    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    // MJD - debug

//    SOAPHTTPConnection conn = new SOAPHTTPConnection();
//    conn.send(url, "", null, envelope, smr, sc);
    String response = IOUtils.getStringFromReader(fr);
    System.out.println("Got Response:\n"+response);
    envelope = ServerUtils.readEnvelopeFromInputStream(_documentBuilder, new
    ByteArrayInputStream(response.getBytes()),
    response.length(), "text/xml", new EnvelopeEditorAdapter(), sc);
    resp = resp.extractFromEnvelope(envelope, smr, sc);

    // MJD - debug
    System.err.println("resp=" + resp);
    // MJD - debug
  }
}

I put the XML you sent in a file called test.xml, which I've attached, and I
commented out the send portion (since I have no place to send it to). The
lines enclosed in "// MJD - debug" were added by me. The output was as
follows:

Got Response:
<?xml version='1.0' encoding='UTF-8'?>
<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:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">3</return>
</ns1:instantiateOfferResponse>

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

resp=[Header=null] [methodName=instantiateOffer]
[targetObjectURI=urn:Subscripti
onService] [encodingStyleURI=http://schemas.xmlsoap.org/soap/encoding/]
[SOAPCon
text=[Parts={[cid:null type: text/xml enc: null]}]] [return=[name=return]
[type=
int] [value=3] [encodingStyleURI=null]]
[Params={}]

Incidentally, while I don't have a deep understanding of the way the
SOAPContext is used everywhere, I'm pretty sure you're supposed to use a
different SOAPContext for the request and the response. I notice in your
code that you're using the same "sc" reference everywhere. Give that a shot,
and see if anything changes.

Thanks,
-Matt

> -----Original Message-----
> From: jhazen@jhazen-t20.corp.myplay.com
> [mailto:jhazen@jhazen-t20.corp.myplay.com]On Behalf Of Jim Hazen
> Sent: Wednesday, May 23, 2001 5:18 PM
> To: soap-user@xml.apache.org
> Subject: Re: Works fine with Xerces v1.4.0! (Problems)
>
>
> I've found and fixed a bug in my xerces1.4.0 setup.  I now get
> the same error I
> was getting with xerces1.2.3.
>
> java.lang.IllegalArgumentException: Root element of a SOAP
> message must be:
> 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
>         at org.apache.soap.Envelope.unmarshall(Envelope.java:306)
>         at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
>         at
> org.apache.soap.transport.TransportMessage.unmarshall(TransportMes
> sage.java:279)
>
>         at
> org.apache.soap.server.ServerUtils.readEnvelopeFromInputStream(Ser
> verUtils.java:121)
>
>         ...
>
> The response message is below:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <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:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <return xsi:type="xsd:int">3</return>
> </ns1:instantiateOfferResponse>
>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> The fact that I'm back to the same problems I was having under
> xerces 1.2.3 is a
> good sign for 1.4.0 actually.  However I still don't understand
> what would cause
> the above error.  This doesn't happen given the same message
> contents in SOAP
> 2.1.  The exact lines of code I use are below:
>
> SOAPHTTPConnection conn = new SOAPHTTPConnection();
> conn.send(url, "", null, envelope, smr, sc);
> String response = IOUtils.getStringFromReader(conn.receive());
> System.out.println("Got Response:\n"+response);
> envelope = ServerUtils.readEnvelopeFromInputStream(_documentBuilder, new
> ByteArrayInputStream(response.getBytes()),
> response.length(), "text/xml", new EnvelopeEditorAdapter(), sc);
> resp = resp.extractFromEnvelope(envelope, smr, sc);
>
> This same code works on the same XML message in 2.1.  From what
> I've heard and
> read about 2.2, there is no reason it shouldn't work.  You guys
> are versioning
> schema changes, and the protocol seems to be identical.  Unless
> readEnvelopeFromInputStream has changed between versions I don't
> know what the
> problem would be.
>
> Any help really would be appreciated.  If this turns out to be a
> problem with
> SOAP 2.2, I'd like these changes to be included in the 2.2
> release, and not some
> nightly build of Axis.  This is my main concern with the quick
> SOAP 2.2 release
> schedule.
>
> Thanks,
> Jim
>
> > Can you please use the tunnel and post the response that's causing
> > this?
> >
> > Are you able to get any of the samples working?
> >
> > Sanjiva.
> >
> > ----- Original Message -----
> > From: "Jim Hazen" <ji...@myplay.com>
> > To: <so...@xml.apache.org>
> > Sent: Wednesday, May 23, 2001 3:19 PM
> > Subject: Re: Works fine with Xerces v1.4.0! (Problems)
> >
> > > I've upgraded to Xerces 1.4.0 and get the following error
> when I try and
> > send a
> > > message via SOAPHTTPConnection.send.
> > >
> > > conn.send(url, "", null, envelope, smr, sc);
> > >
> > > [SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing
> HTTP status
> > line
> > > "": java.util.NoSuchElementException;
> > > targetException=java.lang.IllegalArgumentException: Error parsing HTTP
> > status
> > > line "": java.util.NoSuchElementException]
> > >         at
> > >
> >
> org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPCon
> nection.ja
> > va:324)
> > >
> > >         ...
> > >
> > > Any idea what could cause this error.  The same code works
> fine with SOAP
> > 2.1
> > > and Xerces 1.2.3.
> > >
> > > Thanks,
> > > Jim
> > >
> > > > Matt,
> > > > None of the samples have anything to do with SOAP-Headers...am badly
> > stuck
> > > > with a problem and have not been able to catch anyone's attention on
> > this
> > > > m-list.
> > > >
> > > > Have you been able to set Header from the client and
> extract it on the
> > > > server-side at all? My Envelope in the pipe has the Header
> info, but in
> > the
> > > > RPCRouterServlet, the Header shows up with null values. I have sent
> > another
> > > > message to this list (subject-line: SOAP-Header problem) with a more
> > > > elaborate description.
> > > >
> > > > Will wait for any response,
> > > > Thanks,
> > > > --KH
> > > >
> > > > -----Original Message-----
> > > > From: Matthew J. Duftler [mailto:duftler@watson.ibm.com]
> > > > Sent: Wednesday, May 23, 2001 9:32 AM
> > > > To: soap-dev; soap-user
> > > > Subject: Works fine with Xerces v1.4.0!
> > > >
> > > > Hi All,
> > > >
> > > > I just tried most of the samples with Xerces v1.4.0, both
> on the client
> > and
> > > > the server, and they worked fine. It appears the
> namespace-handling bug
> > fix
> > > > is indeed in v1.4.0.
> > > >
> > > > Thanks,
> > > > -Matt
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > > For additional commands, email: soap-user-help@xml.apache.org
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > > For additional commands, email: soap-user-help@xml.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > For additional commands, email: soap-user-help@xml.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: Works fine with Xerces v1.4.0! (Problems)

Posted by "Matthew J. Duftler" <du...@watson.ibm.com>.
Hi Jim,

I tried your code below, and it worked fine for me. I am working with Xerces
v1.4.0.

The code I used:

package samples.jh;

import java.io.*;
import javax.xml.parsers.*;
import org.apache.soap.*;
import org.apache.soap.encoding.*;
import org.apache.soap.rpc.*;
import org.apache.soap.server.*;
import org.apache.soap.transport.*;
import org.apache.soap.util.*;
import org.apache.soap.util.xml.*;

public class TestRead
{
  public static void main(String[] argv) throws Exception
  {
    // MJD - debug
    FileReader fr = new FileReader(argv[0]);
    DocumentBuilder _documentBuilder = XMLParserUtils.getXMLDocBuilder();
    Envelope envelope = null;
    Response resp = null;
    SOAPContext sc = new SOAPContext();
    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    // MJD - debug

//    SOAPHTTPConnection conn = new SOAPHTTPConnection();
//    conn.send(url, "", null, envelope, smr, sc);
    String response = IOUtils.getStringFromReader(fr);
    System.out.println("Got Response:\n"+response);
    envelope = ServerUtils.readEnvelopeFromInputStream(_documentBuilder, new
    ByteArrayInputStream(response.getBytes()),
    response.length(), "text/xml", new EnvelopeEditorAdapter(), sc);
    resp = resp.extractFromEnvelope(envelope, smr, sc);

    // MJD - debug
    System.err.println("resp=" + resp);
    // MJD - debug
  }
}

I put the XML you sent in a file called test.xml, which I've attached, and I
commented out the send portion (since I have no place to send it to). The
lines enclosed in "// MJD - debug" were added by me. The output was as
follows:

Got Response:
<?xml version='1.0' encoding='UTF-8'?>
<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:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">3</return>
</ns1:instantiateOfferResponse>

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

resp=[Header=null] [methodName=instantiateOffer]
[targetObjectURI=urn:Subscripti
onService] [encodingStyleURI=http://schemas.xmlsoap.org/soap/encoding/]
[SOAPCon
text=[Parts={[cid:null type: text/xml enc: null]}]] [return=[name=return]
[type=
int] [value=3] [encodingStyleURI=null]]
[Params={}]

Incidentally, while I don't have a deep understanding of the way the
SOAPContext is used everywhere, I'm pretty sure you're supposed to use a
different SOAPContext for the request and the response. I notice in your
code that you're using the same "sc" reference everywhere. Give that a shot,
and see if anything changes.

Thanks,
-Matt

> -----Original Message-----
> From: jhazen@jhazen-t20.corp.myplay.com
> [mailto:jhazen@jhazen-t20.corp.myplay.com]On Behalf Of Jim Hazen
> Sent: Wednesday, May 23, 2001 5:18 PM
> To: soap-user@xml.apache.org
> Subject: Re: Works fine with Xerces v1.4.0! (Problems)
>
>
> I've found and fixed a bug in my xerces1.4.0 setup.  I now get
> the same error I
> was getting with xerces1.2.3.
>
> java.lang.IllegalArgumentException: Root element of a SOAP
> message must be:
> 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
>         at org.apache.soap.Envelope.unmarshall(Envelope.java:306)
>         at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
>         at
> org.apache.soap.transport.TransportMessage.unmarshall(TransportMes
> sage.java:279)
>
>         at
> org.apache.soap.server.ServerUtils.readEnvelopeFromInputStream(Ser
> verUtils.java:121)
>
>         ...
>
> The response message is below:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <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:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <return xsi:type="xsd:int">3</return>
> </ns1:instantiateOfferResponse>
>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> The fact that I'm back to the same problems I was having under
> xerces 1.2.3 is a
> good sign for 1.4.0 actually.  However I still don't understand
> what would cause
> the above error.  This doesn't happen given the same message
> contents in SOAP
> 2.1.  The exact lines of code I use are below:
>
> SOAPHTTPConnection conn = new SOAPHTTPConnection();
> conn.send(url, "", null, envelope, smr, sc);
> String response = IOUtils.getStringFromReader(conn.receive());
> System.out.println("Got Response:\n"+response);
> envelope = ServerUtils.readEnvelopeFromInputStream(_documentBuilder, new
> ByteArrayInputStream(response.getBytes()),
> response.length(), "text/xml", new EnvelopeEditorAdapter(), sc);
> resp = resp.extractFromEnvelope(envelope, smr, sc);
>
> This same code works on the same XML message in 2.1.  From what
> I've heard and
> read about 2.2, there is no reason it shouldn't work.  You guys
> are versioning
> schema changes, and the protocol seems to be identical.  Unless
> readEnvelopeFromInputStream has changed between versions I don't
> know what the
> problem would be.
>
> Any help really would be appreciated.  If this turns out to be a
> problem with
> SOAP 2.2, I'd like these changes to be included in the 2.2
> release, and not some
> nightly build of Axis.  This is my main concern with the quick
> SOAP 2.2 release
> schedule.
>
> Thanks,
> Jim
>
> > Can you please use the tunnel and post the response that's causing
> > this?
> >
> > Are you able to get any of the samples working?
> >
> > Sanjiva.
> >
> > ----- Original Message -----
> > From: "Jim Hazen" <ji...@myplay.com>
> > To: <so...@xml.apache.org>
> > Sent: Wednesday, May 23, 2001 3:19 PM
> > Subject: Re: Works fine with Xerces v1.4.0! (Problems)
> >
> > > I've upgraded to Xerces 1.4.0 and get the following error
> when I try and
> > send a
> > > message via SOAPHTTPConnection.send.
> > >
> > > conn.send(url, "", null, envelope, smr, sc);
> > >
> > > [SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing
> HTTP status
> > line
> > > "": java.util.NoSuchElementException;
> > > targetException=java.lang.IllegalArgumentException: Error parsing HTTP
> > status
> > > line "": java.util.NoSuchElementException]
> > >         at
> > >
> >
> org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPCon
> nection.ja
> > va:324)
> > >
> > >         ...
> > >
> > > Any idea what could cause this error.  The same code works
> fine with SOAP
> > 2.1
> > > and Xerces 1.2.3.
> > >
> > > Thanks,
> > > Jim
> > >
> > > > Matt,
> > > > None of the samples have anything to do with SOAP-Headers...am badly
> > stuck
> > > > with a problem and have not been able to catch anyone's attention on
> > this
> > > > m-list.
> > > >
> > > > Have you been able to set Header from the client and
> extract it on the
> > > > server-side at all? My Envelope in the pipe has the Header
> info, but in
> > the
> > > > RPCRouterServlet, the Header shows up with null values. I have sent
> > another
> > > > message to this list (subject-line: SOAP-Header problem) with a more
> > > > elaborate description.
> > > >
> > > > Will wait for any response,
> > > > Thanks,
> > > > --KH
> > > >
> > > > -----Original Message-----
> > > > From: Matthew J. Duftler [mailto:duftler@watson.ibm.com]
> > > > Sent: Wednesday, May 23, 2001 9:32 AM
> > > > To: soap-dev; soap-user
> > > > Subject: Works fine with Xerces v1.4.0!
> > > >
> > > > Hi All,
> > > >
> > > > I just tried most of the samples with Xerces v1.4.0, both
> on the client
> > and
> > > > the server, and they worked fine. It appears the
> namespace-handling bug
> > fix
> > > > is indeed in v1.4.0.
> > > >
> > > > Thanks,
> > > > -Matt
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > > For additional commands, email: soap-user-help@xml.apache.org
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > > For additional commands, email: soap-user-help@xml.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > For additional commands, email: soap-user-help@xml.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Works fine with Xerces v1.4.0! (Problems)

Posted by Jim Hazen <ji...@myplay.com>.
I've found and fixed a bug in my xerces1.4.0 setup.  I now get the same error I
was getting with xerces1.2.3.

java.lang.IllegalArgumentException: Root element of a SOAP message must be:
'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
        at org.apache.soap.Envelope.unmarshall(Envelope.java:306)
        at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
        at
org.apache.soap.transport.TransportMessage.unmarshall(TransportMessage.java:279)

        at
org.apache.soap.server.ServerUtils.readEnvelopeFromInputStream(ServerUtils.java:121)

        ...

The response message is below:

<?xml version='1.0' encoding='UTF-8'?>
<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:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">3</return>
</ns1:instantiateOfferResponse>

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


The fact that I'm back to the same problems I was having under xerces 1.2.3 is a
good sign for 1.4.0 actually.  However I still don't understand what would cause
the above error.  This doesn't happen given the same message contents in SOAP
2.1.  The exact lines of code I use are below:

SOAPHTTPConnection conn = new SOAPHTTPConnection();
conn.send(url, "", null, envelope, smr, sc);
String response = IOUtils.getStringFromReader(conn.receive());
System.out.println("Got Response:\n"+response);
envelope = ServerUtils.readEnvelopeFromInputStream(_documentBuilder, new
ByteArrayInputStream(response.getBytes()),
response.length(), "text/xml", new EnvelopeEditorAdapter(), sc);
resp = resp.extractFromEnvelope(envelope, smr, sc);

This same code works on the same XML message in 2.1.  From what I've heard and
read about 2.2, there is no reason it shouldn't work.  You guys are versioning
schema changes, and the protocol seems to be identical.  Unless
readEnvelopeFromInputStream has changed between versions I don't know what the
problem would be.

Any help really would be appreciated.  If this turns out to be a problem with
SOAP 2.2, I'd like these changes to be included in the 2.2 release, and not some
nightly build of Axis.  This is my main concern with the quick SOAP 2.2 release
schedule.

Thanks,
Jim

> Can you please use the tunnel and post the response that's causing
> this?
>
> Are you able to get any of the samples working?
>
> Sanjiva.
>
> ----- Original Message -----
> From: "Jim Hazen" <ji...@myplay.com>
> To: <so...@xml.apache.org>
> Sent: Wednesday, May 23, 2001 3:19 PM
> Subject: Re: Works fine with Xerces v1.4.0! (Problems)
>
> > I've upgraded to Xerces 1.4.0 and get the following error when I try and
> send a
> > message via SOAPHTTPConnection.send.
> >
> > conn.send(url, "", null, envelope, smr, sc);
> >
> > [SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing HTTP status
> line
> > "": java.util.NoSuchElementException;
> > targetException=java.lang.IllegalArgumentException: Error parsing HTTP
> status
> > line "": java.util.NoSuchElementException]
> >         at
> >
> org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
> va:324)
> >
> >         ...
> >
> > Any idea what could cause this error.  The same code works fine with SOAP
> 2.1
> > and Xerces 1.2.3.
> >
> > Thanks,
> > Jim
> >
> > > Matt,
> > > None of the samples have anything to do with SOAP-Headers...am badly
> stuck
> > > with a problem and have not been able to catch anyone's attention on
> this
> > > m-list.
> > >
> > > Have you been able to set Header from the client and extract it on the
> > > server-side at all? My Envelope in the pipe has the Header info, but in
> the
> > > RPCRouterServlet, the Header shows up with null values. I have sent
> another
> > > message to this list (subject-line: SOAP-Header problem) with a more
> > > elaborate description.
> > >
> > > Will wait for any response,
> > > Thanks,
> > > --KH
> > >
> > > -----Original Message-----
> > > From: Matthew J. Duftler [mailto:duftler@watson.ibm.com]
> > > Sent: Wednesday, May 23, 2001 9:32 AM
> > > To: soap-dev; soap-user
> > > Subject: Works fine with Xerces v1.4.0!
> > >
> > > Hi All,
> > >
> > > I just tried most of the samples with Xerces v1.4.0, both on the client
> and
> > > the server, and they worked fine. It appears the namespace-handling bug
> fix
> > > is indeed in v1.4.0.
> > >
> > > Thanks,
> > > -Matt
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > For additional commands, email: soap-user-help@xml.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > For additional commands, email: soap-user-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Works fine with Xerces v1.4.0! (Problems)

Posted by Jim Hazen <ji...@myplay.com>.
I've found and fixed a bug in my xerces1.4.0 setup.  I now get the same error I
was getting with xerces1.2.3.

java.lang.IllegalArgumentException: Root element of a SOAP message must be:
'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.
        at org.apache.soap.Envelope.unmarshall(Envelope.java:306)
        at org.apache.soap.Envelope.unmarshall(Envelope.java:228)
        at
org.apache.soap.transport.TransportMessage.unmarshall(TransportMessage.java:279)

        at
org.apache.soap.server.ServerUtils.readEnvelopeFromInputStream(ServerUtils.java:121)

        ...

The response message is below:

<?xml version='1.0' encoding='UTF-8'?>
<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:instantiateOfferResponse xmlns:ns1="urn:SubscriptionService"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">3</return>
</ns1:instantiateOfferResponse>

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


The fact that I'm back to the same problems I was having under xerces 1.2.3 is a
good sign for 1.4.0 actually.  However I still don't understand what would cause
the above error.  This doesn't happen given the same message contents in SOAP
2.1.  The exact lines of code I use are below:

SOAPHTTPConnection conn = new SOAPHTTPConnection();
conn.send(url, "", null, envelope, smr, sc);
String response = IOUtils.getStringFromReader(conn.receive());
System.out.println("Got Response:\n"+response);
envelope = ServerUtils.readEnvelopeFromInputStream(_documentBuilder, new
ByteArrayInputStream(response.getBytes()),
response.length(), "text/xml", new EnvelopeEditorAdapter(), sc);
resp = resp.extractFromEnvelope(envelope, smr, sc);

This same code works on the same XML message in 2.1.  From what I've heard and
read about 2.2, there is no reason it shouldn't work.  You guys are versioning
schema changes, and the protocol seems to be identical.  Unless
readEnvelopeFromInputStream has changed between versions I don't know what the
problem would be.

Any help really would be appreciated.  If this turns out to be a problem with
SOAP 2.2, I'd like these changes to be included in the 2.2 release, and not some
nightly build of Axis.  This is my main concern with the quick SOAP 2.2 release
schedule.

Thanks,
Jim

> Can you please use the tunnel and post the response that's causing
> this?
>
> Are you able to get any of the samples working?
>
> Sanjiva.
>
> ----- Original Message -----
> From: "Jim Hazen" <ji...@myplay.com>
> To: <so...@xml.apache.org>
> Sent: Wednesday, May 23, 2001 3:19 PM
> Subject: Re: Works fine with Xerces v1.4.0! (Problems)
>
> > I've upgraded to Xerces 1.4.0 and get the following error when I try and
> send a
> > message via SOAPHTTPConnection.send.
> >
> > conn.send(url, "", null, envelope, smr, sc);
> >
> > [SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing HTTP status
> line
> > "": java.util.NoSuchElementException;
> > targetException=java.lang.IllegalArgumentException: Error parsing HTTP
> status
> > line "": java.util.NoSuchElementException]
> >         at
> >
> org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
> va:324)
> >
> >         ...
> >
> > Any idea what could cause this error.  The same code works fine with SOAP
> 2.1
> > and Xerces 1.2.3.
> >
> > Thanks,
> > Jim
> >
> > > Matt,
> > > None of the samples have anything to do with SOAP-Headers...am badly
> stuck
> > > with a problem and have not been able to catch anyone's attention on
> this
> > > m-list.
> > >
> > > Have you been able to set Header from the client and extract it on the
> > > server-side at all? My Envelope in the pipe has the Header info, but in
> the
> > > RPCRouterServlet, the Header shows up with null values. I have sent
> another
> > > message to this list (subject-line: SOAP-Header problem) with a more
> > > elaborate description.
> > >
> > > Will wait for any response,
> > > Thanks,
> > > --KH
> > >
> > > -----Original Message-----
> > > From: Matthew J. Duftler [mailto:duftler@watson.ibm.com]
> > > Sent: Wednesday, May 23, 2001 9:32 AM
> > > To: soap-dev; soap-user
> > > Subject: Works fine with Xerces v1.4.0!
> > >
> > > Hi All,
> > >
> > > I just tried most of the samples with Xerces v1.4.0, both on the client
> and
> > > the server, and they worked fine. It appears the namespace-handling bug
> fix
> > > is indeed in v1.4.0.
> > >
> > > Thanks,
> > > -Matt
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > For additional commands, email: soap-user-help@xml.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > > For additional commands, email: soap-user-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Works fine with Xerces v1.4.0! (Problems)

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
Can you please use the tunnel and post the response that's causing
this?

Are you able to get any of the samples working?

Sanjiva.

----- Original Message -----
From: "Jim Hazen" <ji...@myplay.com>
To: <so...@xml.apache.org>
Sent: Wednesday, May 23, 2001 3:19 PM
Subject: Re: Works fine with Xerces v1.4.0! (Problems)


> I've upgraded to Xerces 1.4.0 and get the following error when I try and
send a
> message via SOAPHTTPConnection.send.
>
> conn.send(url, "", null, envelope, smr, sc);
>
> [SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing HTTP status
line
> "": java.util.NoSuchElementException;
> targetException=java.lang.IllegalArgumentException: Error parsing HTTP
status
> line "": java.util.NoSuchElementException]
>         at
>
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
va:324)
>
>         ...
>
> Any idea what could cause this error.  The same code works fine with SOAP
2.1
> and Xerces 1.2.3.
>
> Thanks,
> Jim
>
> > Matt,
> > None of the samples have anything to do with SOAP-Headers...am badly
stuck
> > with a problem and have not been able to catch anyone's attention on
this
> > m-list.
> >
> > Have you been able to set Header from the client and extract it on the
> > server-side at all? My Envelope in the pipe has the Header info, but in
the
> > RPCRouterServlet, the Header shows up with null values. I have sent
another
> > message to this list (subject-line: SOAP-Header problem) with a more
> > elaborate description.
> >
> > Will wait for any response,
> > Thanks,
> > --KH
> >
> > -----Original Message-----
> > From: Matthew J. Duftler [mailto:duftler@watson.ibm.com]
> > Sent: Wednesday, May 23, 2001 9:32 AM
> > To: soap-dev; soap-user
> > Subject: Works fine with Xerces v1.4.0!
> >
> > Hi All,
> >
> > I just tried most of the samples with Xerces v1.4.0, both on the client
and
> > the server, and they worked fine. It appears the namespace-handling bug
fix
> > is indeed in v1.4.0.
> >
> > Thanks,
> > -Matt
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Works fine with Xerces v1.4.0! (Problems)

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
Can you please use the tunnel and post the response that's causing
this?

Are you able to get any of the samples working?

Sanjiva.

----- Original Message -----
From: "Jim Hazen" <ji...@myplay.com>
To: <so...@xml.apache.org>
Sent: Wednesday, May 23, 2001 3:19 PM
Subject: Re: Works fine with Xerces v1.4.0! (Problems)


> I've upgraded to Xerces 1.4.0 and get the following error when I try and
send a
> message via SOAPHTTPConnection.send.
>
> conn.send(url, "", null, envelope, smr, sc);
>
> [SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing HTTP status
line
> "": java.util.NoSuchElementException;
> targetException=java.lang.IllegalArgumentException: Error parsing HTTP
status
> line "": java.util.NoSuchElementException]
>         at
>
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
va:324)
>
>         ...
>
> Any idea what could cause this error.  The same code works fine with SOAP
2.1
> and Xerces 1.2.3.
>
> Thanks,
> Jim
>
> > Matt,
> > None of the samples have anything to do with SOAP-Headers...am badly
stuck
> > with a problem and have not been able to catch anyone's attention on
this
> > m-list.
> >
> > Have you been able to set Header from the client and extract it on the
> > server-side at all? My Envelope in the pipe has the Header info, but in
the
> > RPCRouterServlet, the Header shows up with null values. I have sent
another
> > message to this list (subject-line: SOAP-Header problem) with a more
> > elaborate description.
> >
> > Will wait for any response,
> > Thanks,
> > --KH
> >
> > -----Original Message-----
> > From: Matthew J. Duftler [mailto:duftler@watson.ibm.com]
> > Sent: Wednesday, May 23, 2001 9:32 AM
> > To: soap-dev; soap-user
> > Subject: Works fine with Xerces v1.4.0!
> >
> > Hi All,
> >
> > I just tried most of the samples with Xerces v1.4.0, both on the client
and
> > the server, and they worked fine. It appears the namespace-handling bug
fix
> > is indeed in v1.4.0.
> >
> > Thanks,
> > -Matt
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Works fine with Xerces v1.4.0! (Problems)

Posted by Jim Hazen <ji...@myplay.com>.
I've upgraded to Xerces 1.4.0 and get the following error when I try and send a
message via SOAPHTTPConnection.send.

conn.send(url, "", null, envelope, smr, sc);

[SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing HTTP status line
"": java.util.NoSuchElementException;
targetException=java.lang.IllegalArgumentException: Error parsing HTTP status
line "": java.util.NoSuchElementException]
        at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:324)

        ...

Any idea what could cause this error.  The same code works fine with SOAP 2.1
and Xerces 1.2.3.

Thanks,
Jim

> Matt,
> None of the samples have anything to do with SOAP-Headers...am badly stuck
> with a problem and have not been able to catch anyone's attention on this
> m-list.
>
> Have you been able to set Header from the client and extract it on the
> server-side at all? My Envelope in the pipe has the Header info, but in the
> RPCRouterServlet, the Header shows up with null values. I have sent another
> message to this list (subject-line: SOAP-Header problem) with a more
> elaborate description.
>
> Will wait for any response,
> Thanks,
> --KH
>
> -----Original Message-----
> From: Matthew J. Duftler [mailto:duftler@watson.ibm.com]
> Sent: Wednesday, May 23, 2001 9:32 AM
> To: soap-dev; soap-user
> Subject: Works fine with Xerces v1.4.0!
>
> Hi All,
>
> I just tried most of the samples with Xerces v1.4.0, both on the client and
> the server, and they worked fine. It appears the namespace-handling bug fix
> is indeed in v1.4.0.
>
> Thanks,
> -Matt
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Works fine with Xerces v1.4.0! (Problems)

Posted by Jim Hazen <ji...@myplay.com>.
I've upgraded to Xerces 1.4.0 and get the following error when I try and send a
message via SOAPHTTPConnection.send.

conn.send(url, "", null, envelope, smr, sc);

[SOAPException: faultCode=SOAP-ENV:Client; msg=Error parsing HTTP status line
"": java.util.NoSuchElementException;
targetException=java.lang.IllegalArgumentException: Error parsing HTTP status
line "": java.util.NoSuchElementException]
        at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:324)

        ...

Any idea what could cause this error.  The same code works fine with SOAP 2.1
and Xerces 1.2.3.

Thanks,
Jim

> Matt,
> None of the samples have anything to do with SOAP-Headers...am badly stuck
> with a problem and have not been able to catch anyone's attention on this
> m-list.
>
> Have you been able to set Header from the client and extract it on the
> server-side at all? My Envelope in the pipe has the Header info, but in the
> RPCRouterServlet, the Header shows up with null values. I have sent another
> message to this list (subject-line: SOAP-Header problem) with a more
> elaborate description.
>
> Will wait for any response,
> Thanks,
> --KH
>
> -----Original Message-----
> From: Matthew J. Duftler [mailto:duftler@watson.ibm.com]
> Sent: Wednesday, May 23, 2001 9:32 AM
> To: soap-dev; soap-user
> Subject: Works fine with Xerces v1.4.0!
>
> Hi All,
>
> I just tried most of the samples with Xerces v1.4.0, both on the client and
> the server, and they worked fine. It appears the namespace-handling bug fix
> is indeed in v1.4.0.
>
> Thanks,
> -Matt
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: Works fine with Xerces v1.4.0!

Posted by Kartheek Hirode <ka...@centegy.com>.
Matt,
None of the samples have anything to do with SOAP-Headers...am badly stuck
with a problem and have not been able to catch anyone's attention on this
m-list.

Have you been able to set Header from the client and extract it on the
server-side at all? My Envelope in the pipe has the Header info, but in the
RPCRouterServlet, the Header shows up with null values. I have sent another
message to this list (subject-line: SOAP-Header problem) with a more
elaborate description.

Will wait for any response,
Thanks,
--KH


-----Original Message-----
From: Matthew J. Duftler [mailto:duftler@watson.ibm.com]
Sent: Wednesday, May 23, 2001 9:32 AM
To: soap-dev; soap-user
Subject: Works fine with Xerces v1.4.0!


Hi All,

I just tried most of the samples with Xerces v1.4.0, both on the client and
the server, and they worked fine. It appears the namespace-handling bug fix
is indeed in v1.4.0.

Thanks,
-Matt


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


RE: Works fine with Xerces v1.4.0!

Posted by Kartheek Hirode <ka...@centegy.com>.
Matt,
None of the samples have anything to do with SOAP-Headers...am badly stuck
with a problem and have not been able to catch anyone's attention on this
m-list.

Have you been able to set Header from the client and extract it on the
server-side at all? My Envelope in the pipe has the Header info, but in the
RPCRouterServlet, the Header shows up with null values. I have sent another
message to this list (subject-line: SOAP-Header problem) with a more
elaborate description.

Will wait for any response,
Thanks,
--KH


-----Original Message-----
From: Matthew J. Duftler [mailto:duftler@watson.ibm.com]
Sent: Wednesday, May 23, 2001 9:32 AM
To: soap-dev; soap-user
Subject: Works fine with Xerces v1.4.0!


Hi All,

I just tried most of the samples with Xerces v1.4.0, both on the client and
the server, and they worked fine. It appears the namespace-handling bug fix
is indeed in v1.4.0.

Thanks,
-Matt


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org