axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James M Snell" <jasn...@us.ibm.com>
Subject Re: SOAPBodyElement serialization bug
Date Thu, 06 Dec 2001 05:56:03 GMT
Which UDDI registry are you using?  One of the public ones?

- James M Snell/Fresno/IBM
    Web services architecture and strategy
    Internet Emerging Technologies, IBM
    544.9035 TIE line
    559.587.1233 Office
    919.486.0077 Voice Mail
    jasnell@us.ibm.com
=================================================================
Have I not commanded you?  Be strong and courageous.  Do not be terrified, 

do not be discouraged, for the Lord your God will be with you wherever you 
go.  
- Joshua 1:9

Please respond to axis-dev@xml.apache.org 
To:     axis-dev@xml.apache.org
cc: 
Subject:        Re: SOAPBodyElement serialization bug



Using createElementNS seems to generate a semantically correct outgoing
message. However, the registry I tested against did not like the message.
Looks like it might be a UDDI registry issue. For the time being, we have
the work around in UDDI4J that is working. It is a major change to UDDI4J
to use createElementNS. Does not seem necessary to resolve this before
alpha 3 is released. The only difference I notice is the namespace prefix
declaration and use.

This brings up another issue. UDDI4J does its own fault processing. Axis 
is
throwing an AxisFault when a fault is received. Is there a way to retrieve
the original message so that I can handle it myself? HP's SOAP stack has
similar behavior, but the thrown exception has a getMessage method which
returns the original message.


Outgoing msg:
<?xml version="1.0" encoding="UTF-8"?>

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

  <SOAP-ENV:Body>
   <ns1:find_business generic="2.0" maxRows="5" xmlns:ns1
="urn:uddi-org:api_v2">
    <findQualifiers>
     <findQualifier>caseSensitiveMatch
     </findQualifier>
    </findQualifiers>
    <name>S
    </name>
   </ns1:find_business>
  </SOAP-ENV:Body>

 </SOAP-ENV:Envelope>

Response:
<?xml version="1.0" encoding="UTF-8" ?>
 <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
  <Body>
   <Fault>
    <faultcode>Client
    </faultcode>
    <faultstring>Client Error
    </faultstring>
    <detail>
     <dispositionReport generic="2.0" xmlns="urn:uddi-org:api_v2" operator
="www.ibm.com/services/uddi">
      <result errno="10500">
       <errInfo errCode="E_fatalError">E_fatalError (10500) Serious
technical error has occurred while processing the request. Element type
&quot;findQualifiers&quot; must be declared.
       </errInfo>
      </result>
     </dispositionReport>
    </detail>
   </Fault>
  </Body>
 </Envelope>



David Melgar
Web Services Toolkit Development
Emerging Technologies
dmelgar@us.ibm.com


Davanum Srinivas <dims@yahoo.com> on 12/04/2001 01:20:15 PM

Please respond to axis-dev@xml.apache.org

To:   axis-dev@xml.apache.org
cc:
Subject:  Re: SOAPBodyElement serialization bug



David,

We are talking about an Alpha-3 Release. Let us make sure that all that is
needed for UDDI4J is
in. So please let us know if using createElementNS works...or if you run
into anything else.

Thanks,
dims

--- James M Snell <jasnell@us.ibm.com> wrote:
> David, this is just a guess, but check to make sure that the
find_business
> element is being created using createElementNS(...) and not
> createElement(...).
>
> - James M Snell/Fresno/IBM
>     Web services architecture and strategy
>     Internet Emerging Technologies, IBM
>     544.9035 TIE line
>     559.587.1233 Office
>     919.486.0077 Voice Mail
>     jasnell@us.ibm.com
> =================================================================
> Have I not commanded you?  Be strong and courageous.  Do not be
terrified,
>
> do not be discouraged, for the Lord your God will be with you wherever
you
> go.
> - Joshua 1:9
>
> Please respond to axis-dev@xml.apache.org
> To:     axis-dev@xml.apache.org
> cc:
> Subject:        Re: SOAPBodyElement serialization bug
>
>
>
> Fixed the problem I reported, but still getting an error. Not sure why.
If
> constructing a SOAPBodyElement from an input stream it works, but if
> constructing from a DOM element, generates an exception: "Cannot invoke
> Call with null namespace URI for method find_business"
>
> Code is as follows:
>          Service  service = new Service();
>          Call     call    = (Call) service.createCall();
>
>          call.setTargetEndpointAddress( url );
>          call.setProperty(HTTPConstants.MC_HTTP_SOAPACTION, "");
>
>          Vector result = null ;
>
>          /* START HACK!!!
>          String str = null ;
>
>          str = org.apache.axis.utils.XMLUtils.ElementToString(el);
>          SOAPBodyElement body = new SOAPBodyElement(new
> java.io.ByteArrayInputStream(str.getBytes()));
>
>          // END HACK!!!! */
>
>          SOAPBodyElement body = new SOAPBodyElement(el);
>
>          Object[] params = new Object[] { body };
>
>          if (debug) {
>             System.err.println("\nRequest message:\n" + params[0]);
>          }
>
>          result = (Vector) call.invoke( params );
>
>
> Request message:
> <find_business generic="2.0" maxRows="5" xmlns
> ="urn:uddi-org:api_v2"><findQualif
>
iers><findQualifier>caseSensitiveMatch</findQualifier></findQualifiers><name>S</

> name></find_business>
> org.uddi4j.transport.TransportException: Cannot invoke Call with null
> namespace
> URI for method find_business
>         at org.uddi4j.transport.ApacheAxisTransport.send(Unknown Source)
>         at 
org.uddi4j.transport.TransportBase.send(TransportBase.java:53)
>         at org.uddi4j.client.UDDIProxy.send(UDDIProxy.java:1658)
>         at org.uddi4j.client.UDDIProxy.find_business(UDDIProxy.java:400)
>         at FindBusinessExample.run(FindBusinessExample.java:72)
>         at FindBusinessExample.main(FindBusinessExample.java:44)
>
> Nested exception:
> Cannot invoke Call with null namespace URI for method find_business
>         at org.apache.axis.client.Call.invoke(Call.java:1221)
>         at org.apache.axis.client.Call.invoke(Call.java:658)
>         at org.uddi4j.transport.ApacheAxisTransport.send(Unknown Source)
>         at 
org.uddi4j.transport.TransportBase.send(TransportBase.java:53)
>         at org.uddi4j.client.UDDIProxy.send(UDDIProxy.java:1658)
>         at org.uddi4j.client.UDDIProxy.find_business(UDDIProxy.java:400)
>         at FindBusinessExample.run(FindBusinessExample.java:72)
>         at FindBusinessExample.main(FindBusinessExample.java:44)
>
> David Melgar
> Web Services Toolkit Development
> Emerging Technologies
> dmelgar@us.ibm.com
>
>
> Davanum Srinivas <dims@yahoo.com> on 12/04/2001 11:20:04 AM
>
> Please respond to axis-dev@xml.apache.org
>
> To:   axis-dev@xml.apache.org
> cc:
> Subject:  Re: SOAPBodyElement serialization bug
>
>
>
> Fixed problem, Added test case.
>
> Thanks,
> dims
>
> --- David Melgar <dmelgar@us.ibm.com> wrote:
> > Updated testcase that still fails. Attribute name ends up as null.
> >
> > import javax.xml.parsers.DocumentBuilder;
> > import javax.xml.parsers.DocumentBuilderFactory;
> > import org.w3c.dom.Element;
> >
> > import org.apache.axis.message.SOAPBodyElement;
> >
> > public class Testcase1 {
> >    public static void main (String args[]) {
> >       try {
> >          DocumentBuilder docBuilder =
DocumentBuilderFactory.newInstance
> > ().newDocumentBuilder();
> >          Element base = docBuilder.newDocument().createElement("tmp");
> >          base.setAttribute("attrib", "foo");
> >          SOAPBodyElement body = new SOAPBodyElement(base);
> >          System.out.println("Body:" + body);
> >       } catch (Exception e) {
> >          e.printStackTrace();
> >       }
> >    }
> > }
> >
> > Example: should be
> > <tmp attrib="foo"/>
> >
> > ends up as
> > <tmp null="foo"/>
> >
> > David Melgar
> > Web Services Toolkit Development
> > Emerging Technologies
> > dmelgar@us.ibm.com
> >
> > >
> > > Davanum Srinivas <dims@yahoo.com> on 12/04/2001 08:51:32 AM
> > >
> > > Please respond to dims@yahoo.com
> > >
> > > To:   David Melgar/Raleigh/IBM@IBMUS, Sam Ruby/Raleigh/IBM@IBMUS
> > > cc:
> > > Subject:  Re: UDDI4J & Axis
> > >
> > >
> > >
> > > David,
> > > Fixed this bug, please try latest Axis from CVS. I also added a test
> case
> > > for this problem.
> > >
> > > Please let me know when you update UDDI4J cvs. We will test things
> after
> > > that.
> > >
> > > Thanks,
> > > dims
> > >
> > > --- David Melgar <dmelgar@us.ibm.com> wrote:
> > > > I've committed the changes that allow UDDI4J to work with the
latest
> > > > version of Axis. The release has not been updated.
> > > >
> > > > There's a hack in the code due to the bug reported below. This
still
> > > fails
> > > > for me. Seems like a pretty basic bug. Would be nice if someone
> could
> > fix
> > > > this before alpha3 although not critical. Would it get more
response
> if
> > I
> > > > open a bug report?
> > > >
> > > > David Melgar
> > > > Web Services Toolkit Development
> > > > Emerging Technologies
> > > > dmelgar@us.ibm.com
> > > > ---------------------- Forwarded by David Melgar/Raleigh/IBM on
> > > 12/03/2001
> > > > 09:02 PM ---------------------------
> > > >
> > > > David Melgar/Raleigh/IBM@IBMUS on 11/02/2001 02:48:14 PM
> > > >
> > > > Please respond to axis-dev@xml.apache.org
> > > >
> > > > To:   axis-dev@xml.apache.org
> > > > cc:
> > > > Subject:  SOAPBodyElement serialization bug
> > > >
> > > >
> > > >
> > > > I am writing a client that works with DOM elements. This was
working
> > with
> > > > alpha 2. It is no longer working. The problem I'm running into is
> when
> > a
>
=== message truncated ===


=====
Davanum Srinivas - http://jguru.com/dims/

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





Mime
View raw message