axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hua-Shan Cheng" <huash...@hotmail.com>
Subject RE: Bean Mapping Issues
Date Tue, 14 Jan 2003 08:33:50 GMT
<html><div style='background-color:'><DIV>
<P>Hi,</P>
<P>The test example I mentioned in this mail also related to&nbsp;Bean Mapping Issues.</P>
<P>In my test, the&nbsp;bean mapping example amples/userguide/example5)&nbsp;works
well&nbsp;in 1.0, but fails with (all) 1.1 beta version.</P>
<P>I tested this example on Tomcat 4.1.* and jdk 1.4.1. The XML parser is provided by
Tomcat.</P>
<P>Here is the tested result:</P>
<P>The example5/deploy.wsdd contains the following beanMapping:</P>
<P>&lt;beanMapping qName="myNS:Order" xmlns:myNS="urn:BeanService" languageSpecificType="java:samples.userguide.example5.Order"/&gt;</P>
<P>However, after deployment, the sercer-config.wsdd contains this:</P>
<P>&lt;beanMapping languageSpecificType="java:samples.userguide.example5.Order"
qname=""/&gt;<BR></P>
<P>The value of qname is invalid.</P>
<P>The example5/Client then&nbsp;gives a&nbsp;null pointer exception when it
is run. Trying to&nbsp;extract wsdl also&nbsp;dumps exception in Tomcat.</P>
<P>shawn<BR></P></DIV>
<DIV></DIV>
<DIV></DIV>&gt;From: James M Snell <JASNELL@US.IBM.COM>
<DIV></DIV>&gt;Reply-To: axis-dev@xml.apache.org 
<DIV></DIV>&gt;To: axis-dev@xml.apache.org 
<DIV></DIV>&gt;CC: Doug Davis <DUG@US.IBM.COM>
<DIV></DIV>&gt;Subject: RE: Bean Mapping Issues 
<DIV></DIV>&gt;Date: Fri, 10 Jan 2003 15:09:31 -0800 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;ok... I merged the two WSDL documents into one WSDL document
and the code 
<DIV></DIV>&gt;worked. It appears as if there might be some kind of bug with
the Axis 
<DIV></DIV>&gt;code that consumes WSDL's with imports. The bug was introduced
post Axis 
<DIV></DIV>&gt;1.0. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;- James Snell 
<DIV></DIV>&gt; IBM Emerging Technologies 
<DIV></DIV>&gt; jasnell@us.ibm.com 
<DIV></DIV>&gt; (559) 587-1233 (office) 
<DIV></DIV>&gt; (700) 544-9035 (t/l) 
<DIV></DIV>&gt; Programming Web Services With SOAP 
<DIV></DIV>&gt; O'Reilly &amp; Associates, ISBN 0596000952 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; Have I not commanded you? Be strong and courageous. 
<DIV></DIV>&gt; Do not be terrified, do not be discouraged, for the Lord your

<DIV></DIV>&gt; God will be with you whereever you go. - Joshua 1:9 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Glen Daniels <GDANIELS@MACROMEDIA.COM>
<DIV></DIV>&gt;01/09/2003 08:30 PM 
<DIV></DIV>&gt;Please respond to axis-dev 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;To 
<DIV></DIV>&gt;"'axis-dev@xml.apache.org'" <AXIS-DEV@XML.APACHE.ORG>
<DIV></DIV>&gt;cc 
<DIV></DIV>&gt;Doug Davis/Raleigh/IBM@IBMUS 
<DIV></DIV>&gt;bcc 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Subject 
<DIV></DIV>&gt;RE: Bean Mapping Issues 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;James: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;I made a couple of small changes to your WSDL, notably compressed
it into 
<DIV></DIV>&gt;one file and corrected the address to match the service on
my machine (" 
<DIV></DIV>&gt;http://localhost:8080/axis/services/quote"). Then I ran it
through 
<DIV></DIV>&gt;WSDL2Java, creating a server-side implementation, stubs, and
the data 
<DIV></DIV>&gt;classes. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Used this impl: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;public NasdaqQuotes_types.NasdaqQuote getPrice(java.lang.String
symbol) 
<DIV></DIV>&gt;throws java.rmi.RemoteException { 
<DIV></DIV>&gt;NasdaqQuote nq = new NasdaqQuote(); 
<DIV></DIV>&gt;nq.setSymbol(symbol); 
<DIV></DIV>&gt;nq.setLastSalePrice(45.5D); 
<DIV></DIV>&gt;return nq; 
<DIV></DIV>&gt;} 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Then I ran this: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;public class NQTest { 
<DIV></DIV>&gt;public static void main(String[] args) throws Exception { 
<DIV></DIV>&gt;QName svcQName = new QName("http://NasdaqQuotes-Interface",

<DIV></DIV>&gt;"NasdaqQuotesService"); 
<DIV></DIV>&gt;QName portQName = new QName("http://NasdaqQuotes-Interface",
"quote"); 
<DIV></DIV>&gt;QName typeQName = new QName("urn:NasdaqQuotes-types", "NasdaqQuote");

<DIV></DIV>&gt; 
<DIV></DIV>&gt;Service service = new Service("NasdaqQuotes.wsdl", svcQName);

<DIV></DIV>&gt;Call call = (Call)service.createCall(portQName, "getPrice");

<DIV></DIV>&gt;call.registerTypeMapping(NasdaqQuote.class, typeQName, 
<DIV></DIV>&gt;BeanSerializerFactory.class, 
<DIV></DIV>&gt;BeanDeserializerFactory.class); 
<DIV></DIV>&gt;call.setReturnType(typeQName); 
<DIV></DIV>&gt;NasdaqQuote nq = (NasdaqQuote)call.invoke(new Object [] { "foo"
}); 
<DIV></DIV>&gt;System.out.println(nq.toString()); 
<DIV></DIV>&gt;} 
<DIV></DIV>&gt;} 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;And when I had the debugger stop at the println at the end,
the 
<DIV></DIV>&gt;NasdaqQuote was filled in correctly. So I don't know what's
going on for 
<DIV></DIV>&gt;you - it could be that something weird is happening with the
import, since 
<DIV></DIV>&gt;I did squash it into one WSDL, but that seems unlikely. I'm
using the 
<DIV></DIV>&gt;latest codebase, btw. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Did you figure anything more out after you were fortified by
your snack? 
<DIV></DIV>&gt;:) 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--Glen 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; &gt; -----Original Message----- 
<DIV></DIV>&gt; &gt; From: James M Snell [mailto:jasnell@us.ibm.com] 
<DIV></DIV>&gt; &gt; Sent: Thursday, January 09, 2003 7:18 PM 
<DIV></DIV>&gt; &gt; To: axis-dev@xml.apache.org 
<DIV></DIV>&gt; &gt; Cc: Doug Davis 
<DIV></DIV>&gt; &gt; Subject: RE: Bean Mapping Issues 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; Ok, there definitely *appears* to be a problem. 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; I'm initializing the client using the following code
(the 
<DIV></DIV>&gt; &gt; WSDL file is 
<DIV></DIV>&gt; &gt; attached) 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; private static final QName NQqName = 
<DIV></DIV>&gt; &gt; new QName("urn:NasdaqQuotes-types", "NasdaqQuote");

<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; QName serviceQN = new QName("http://" + NQ, NQ +
"Service" ); 
<DIV></DIV>&gt; &gt; QName portQN = new QName("http://" + NQ, "quote");

<DIV></DIV>&gt; &gt; Service service = new Service(new URL(wsdlURL), serviceQN
); 
<DIV></DIV>&gt; &gt; Call call = (Call)service.createCall(portQN, "getPrice");

<DIV></DIV>&gt; &gt; call.registerTypeMapping( 
<DIV></DIV>&gt; &gt; NasdaqQuote.class, 
<DIV></DIV>&gt; &gt; NQqName, 
<DIV></DIV>&gt; &gt; BeanSerializerFactory.class, 
<DIV></DIV>&gt; &gt; BeanDeserializerFactory.class); 
<DIV></DIV>&gt; &gt; call.setReturnType(NQqName); 
<DIV></DIV>&gt; &gt; return (NasdaqQuote)call.invoke( new Object[] { symbol
} ); 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; When running this, I'm getting the following error
while parsing the 
<DIV></DIV>&gt; &gt; response. 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; org.xml.sax.SAXException: Bad types (class 
<DIV></DIV>&gt; &gt; NasdaqQuote -&gt; class 
<DIV></DIV>&gt; &gt; java.lang.String) 
<DIV></DIV>&gt; &gt; at 
<DIV></DIV>&gt; &gt; org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:309)

<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; Digging in, I added a couple of lines of code to
RPCHandler 
<DIV></DIV>&gt; &gt; to see what 
<DIV></DIV>&gt; &gt; was going on and came up with this: 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; Starting at line 215, there is code to retrieve the

<DIV></DIV>&gt; &gt; ParameterDesc for the 
<DIV></DIV>&gt; &gt; current element. This lookup is done using the QName
of the current 
<DIV></DIV>&gt; &gt; element: 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; if (isResponse) { 
<DIV></DIV>&gt; &gt; paramDesc = operation.getOutputParamByQName(qname);

<DIV></DIV>&gt; &gt; } else { 
<DIV></DIV>&gt; &gt; paramDesc = operation.getInputParamByQName(qname);

<DIV></DIV>&gt; &gt; } 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; Anyway, the code properly serializes the request,
sends it to 
<DIV></DIV>&gt; &gt; the server, 
<DIV></DIV>&gt; &gt; the server processes it right, sends a proper response,
then boom, it 
<DIV></DIV>&gt; &gt; blows up. The problem appears to be that the paramDesc

<DIV></DIV>&gt; &gt; returned by the 
<DIV></DIV>&gt; &gt; above operation is wrong given the qname. 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; isResponse == true 
<DIV></DIV>&gt; &gt; qname == getPriceReturn 
<DIV></DIV>&gt; &gt; paramDesc == 
<DIV></DIV>&gt; &gt; name: symbol 
<DIV></DIV>&gt; &gt; typeEntry: null 
<DIV></DIV>&gt; &gt; mode: IN 
<DIV></DIV>&gt; &gt; isReturn: false 
<DIV></DIV>&gt; &gt; typeQName: {http://schemas.xmlsoap.org/soap/encoding/}string

<DIV></DIV>&gt; &gt; javaType: class java.lang.String 
<DIV></DIV>&gt; &gt; inHeader: false 
<DIV></DIV>&gt; &gt; outHeader: false 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; In other words, even though a) we're in the response
and b) qname == 
<DIV></DIV>&gt; &gt; getPriceReturn, the method operation.getOutputParamByQName
is 
<DIV></DIV>&gt; &gt; returning an 
<DIV></DIV>&gt; &gt; IN only parameter from the request message, not the
response. 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; This is making the RPCHandler think it needs to deserialize

<DIV></DIV>&gt; &gt; the data as a 
<DIV></DIV>&gt; &gt; string rather than a NasdaqQuote object. This makes
it mad 
<DIV></DIV>&gt; &gt; and it spits 
<DIV></DIV>&gt; &gt; at me. That's not nice and I want it to stop. I've
told it to stop 
<DIV></DIV>&gt; &gt; spitting at me and it's not listening. That's not
nice either. 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; There's either a) something wrong with my WSDL (possible,
but 
<DIV></DIV>&gt; &gt; unlikely 
<DIV></DIV>&gt; &gt; since the code works perfectly with Axis 1.0) or
b) something 
<DIV></DIV>&gt; &gt; wrong with 
<DIV></DIV>&gt; &gt; the code that initializes the call/parameters/etc
from the 
<DIV></DIV>&gt; &gt; WSDL document. 
<DIV></DIV>&gt; &gt; In either case, it's pissing me off. :-) I'm going
to grab a 
<DIV></DIV>&gt; &gt; snack and 
<DIV></DIV>&gt; &gt; keep digging. 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; - James Snell 
<DIV></DIV>&gt; &gt; IBM Emerging Technologies 
<DIV></DIV>&gt; &gt; jasnell@us.ibm.com 
<DIV></DIV>&gt; &gt; (559) 587-1233 (office) 
<DIV></DIV>&gt; &gt; (700) 544-9035 (t/l) 
<DIV></DIV>&gt; &gt; Programming Web Services With SOAP 
<DIV></DIV>&gt; &gt; O'Reilly &amp; Associates, ISBN 0596000952 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; Have I not commanded you? Be strong and courageous.

<DIV></DIV>&gt; &gt; Do not be terrified, do not be discouraged, for the
Lord your 
<DIV></DIV>&gt; &gt; God will be with you whereever you go. - Joshua 1:9

<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; Glen Daniels <GDANIELS@MACROMEDIA.COM>
<DIV></DIV>&gt; &gt; 01/09/2003 02:20 PM 
<DIV></DIV>&gt; &gt; Please respond to axis-dev 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; To 
<DIV></DIV>&gt; &gt; "'axis-dev@xml.apache.org'" <AXIS-DEV@XML.APACHE.ORG>
<DIV></DIV>&gt; &gt; cc 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; bcc 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; Subject 
<DIV></DIV>&gt; &gt; RE: Bean Mapping Issues 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; Hm. Well, to potentially belabor the obvious... why
don't 
<DIV></DIV>&gt; &gt; you send us the 
<DIV></DIV>&gt; &gt; WSDL? :) 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; --Glen 
<DIV></DIV>&gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; -----Original Message----- 
<DIV></DIV>&gt; &gt; &gt; From: James M Snell [mailto:jasnell@us.ibm.com]

<DIV></DIV>&gt; &gt; &gt; Sent: Thursday, January 09, 2003 5:09 PM

<DIV></DIV>&gt; &gt; &gt; To: axis-dev@xml.apache.org 
<DIV></DIV>&gt; &gt; &gt; Subject: RE: Bean Mapping Issues 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; Starting with a WSDL. This is definitely
being caused by a post 1.0 
<DIV></DIV>&gt; &gt; &gt; change in the axis code. I just tested again
with Axis 1.0 
<DIV></DIV>&gt; &gt; &gt; and it works 
<DIV></DIV>&gt; &gt; &gt; perfectly. 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; - James Snell 
<DIV></DIV>&gt; &gt; &gt; IBM Emerging Technologies 
<DIV></DIV>&gt; &gt; &gt; jasnell@us.ibm.com 
<DIV></DIV>&gt; &gt; &gt; (559) 587-1233 (office) 
<DIV></DIV>&gt; &gt; &gt; (700) 544-9035 (t/l) 
<DIV></DIV>&gt; &gt; &gt; Programming Web Services With SOAP 
<DIV></DIV>&gt; &gt; &gt; O'Reilly &amp; Associates, ISBN 0596000952

<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; Have I not commanded you? Be strong and
courageous. 
<DIV></DIV>&gt; &gt; &gt; Do not be terrified, do not be discouraged,
for the Lord your 
<DIV></DIV>&gt; &gt; &gt; God will be with you whereever you go. -
Joshua 1:9 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; Glen Daniels <GDANIELS@MACROMEDIA.COM>
<DIV></DIV>&gt; &gt; &gt; 01/09/2003 01:48 PM 
<DIV></DIV>&gt; &gt; &gt; Please respond to axis-dev 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; To 
<DIV></DIV>&gt; &gt; &gt; "'axis-dev@xml.apache.org'" <AXIS-DEV@XML.APACHE.ORG>
<DIV></DIV>&gt; &gt; &gt; cc 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; bcc 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; Subject 
<DIV></DIV>&gt; &gt; &gt; RE: Bean Mapping Issues 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; The type mapping defines "NasdaqQuote" as
the local part of 
<DIV></DIV>&gt; &gt; &gt; the *type* 
<DIV></DIV>&gt; &gt; &gt; QName. 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; The "getPriceReturn" element name has nothing
to do with the 
<DIV></DIV>&gt; &gt; &gt; type mapping, 
<DIV></DIV>&gt; &gt; &gt; that's the default (operationName + "Return")
for operations with no 
<DIV></DIV>&gt; &gt; &gt; "returnQName" specified in the WSDD. You
can change it by 
<DIV></DIV>&gt; &gt; &gt; adding to the 
<DIV></DIV>&gt; &gt; &gt; WSDD: 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; <OPERATION name="getPrice" DIV < returnQName="ns:NasdaqQuote">&gt;
&gt; &gt; xmlns:ns="whatever"/&gt; 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; This hasn't changed since 1.0. Are you starting
from a 
<DIV></DIV>&gt; &gt; WSDL here, or 
<DIV></DIV>&gt; &gt; &gt; coding manually? If the former, something
may have changed wrt the 
<DIV></DIV>&gt; &gt; &gt; WSDL2Java handling....? 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; --Glen 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; -----Original Message----- 
<DIV></DIV>&gt; &gt; &gt; &gt; From: James M Snell [mailto:jasnell@us.ibm.com]

<DIV></DIV>&gt; &gt; &gt; &gt; Sent: Thursday, January 09, 2003
3:27 PM 
<DIV></DIV>&gt; &gt; &gt; &gt; To: axis-dev@xml.apache.org 
<DIV></DIV>&gt; &gt; &gt; &gt; Subject: Bean Mapping Issues 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; Hmm.. I'm trying to chase down
a problem I'm having with a 
<DIV></DIV>&gt; &gt; &gt; &gt; bean mapping 
<DIV></DIV>&gt; &gt; &gt; &gt; declaration and want to see if
anyone else can spot the 
<DIV></DIV>&gt; &gt; &gt; problem right 
<DIV></DIV>&gt; &gt; &gt; &gt; away. 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; The service worked perfectly with
Axis 1.0 and doesn't work now. 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; Here's the deploy.wsdd 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; <DEPLOYMENT name="test" DIV
<>&gt; &gt; xmlns="http://xml.apache.org/axis/wsdd/" 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"&gt;

<DIV></DIV>&gt; &gt; &gt; &gt; <SERVICE name="quote" provider="java:RPC">
<DIV></DIV>&gt; &gt; &gt; &gt; <PARAMETER name="className"
value="NasdaqQuotes" />
<DIV></DIV>&gt; &gt; &gt; &gt; <PARAMETER name="allowedMethods"
value="getPrice" />
<DIV></DIV>&gt; &gt; &gt; &gt; </SERVICE>
<DIV></DIV>&gt; &gt; &gt; &gt; <BEANMAPPING DIV <>&gt;
&gt; &gt; &gt; xmlns:nq="urn:NasdaqQuotes-types" 
<DIV></DIV>&gt; &gt; &gt; &gt; languageSpecificType="java:NasdaqQuote"

<DIV></DIV>&gt; &gt; &gt; &gt; qname="nq:NasdaqQuote"/&gt;

<DIV></DIV>&gt; &gt; &gt; &gt; </DEPLOYMENT>
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; The "quote" service's "getPrice"
method returns a NasdaqQuote 
<DIV></DIV>&gt; &gt; &gt; &gt; object that 
<DIV></DIV>&gt; &gt; &gt; &gt; has been mapped to the "urn:NasdaqQuotes-types"
namespace 
<DIV></DIV>&gt; &gt; &gt; &gt; using the qname 
<DIV></DIV>&gt; &gt; &gt; &gt; "NasdaqQuote".... however, below
is the SOAP message that I'm 
<DIV></DIV>&gt; &gt; &gt; &gt; getting in 
<DIV></DIV>&gt; &gt; &gt; &gt; response: 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; <?xml version="1.0" encoding="UTF-8"?>
<DIV></DIV>&gt; &gt; &gt; &gt; <?xml:namespace prefix = soapenv
/><soapenv:Envelope DIV <>&gt; &gt; &gt; &gt; xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

<DIV></DIV>&gt; &gt; &gt; &gt; xmlns:xsd="http://www.w3.org/2001/XMLSchema"

<DIV></DIV>&gt; &gt; &gt; &gt; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;

<DIV></DIV>&gt; &gt; &gt; &gt; <soapenv:Body>
<DIV></DIV>&gt; &gt; &gt; &gt; <?xml:namespace prefix = ns1
/><ns1:getPriceResponse DIV <>&gt; &gt; &gt; &gt; soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"

<DIV></DIV>&gt; &gt; &gt; &gt; xmlns:ns1="http://NasdaqQuotes-Interface"&gt;

<DIV></DIV>&gt; &gt; &gt; &gt; <GETPRICERETURN DIV < xsi:type="ns2:NasdaqQuote">&gt;
&gt; &gt; &gt; xmlns:ns2="urn:NasdaqQuotes-types"&gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; <TODAYSHIGH xsi:type="xsd:double">55.25</TODAYSHIGH>

<DIV></DIV>&gt; &gt; &gt; &gt; <FIFTYTWOWEEKHIGH DIV <>&gt;
&gt; xsi:type="xsd:double"&gt;55.25</FIFTYTWOWEEKHIGH> 
<DIV></DIV>&gt; &gt; &gt; &gt; <TRADINGSTATUS xsi:type="xsd:string">ACTIVE</TRADINGSTATUS>

<DIV></DIV>&gt; &gt; &gt; &gt; <SYMBOL xsi:type="xsd:string">XXX</SYMBOL>

<DIV></DIV>&gt; &gt; &gt; &gt; <TOTALSHARES xsi:type="xsd:long">100</TOTALSHARES>

<DIV></DIV>&gt; &gt; &gt; &gt; <MARKET xsi:type="xsd:string">NYSE</MARKET>

<DIV></DIV>&gt; &gt; &gt; &gt; <TODAYSLOW xsi:type="xsd:double">55.25</TODAYSLOW>

<DIV></DIV>&gt; &gt; &gt; &gt; <ISSUERWEBSITE xsi:type="xsd:string">none</ISSUERWEBSITE>

<DIV></DIV>&gt; &gt; &gt; &gt; <ERRORTEXT xsi:type="xsd:string"></ERRORTEXT>
<DIV></DIV>&gt; &gt; &gt; &gt; <FIFTYTWOWEEKLOW xsi:type="xsd:double">55.25</FIFTYTWOWEEKLOW>

<DIV></DIV>&gt; &gt; &gt; &gt; <LASTSALEPRICE xsi:type="xsd:double">55.25</LASTSALEPRICE>

<DIV></DIV>&gt; &gt; &gt; &gt; <NETPERCENTCHANGE xsi:type="xsd:string">0</NETPERCENTCHANGE>

<DIV></DIV>&gt; &gt; &gt; &gt; <SHAREVOLUME xsi:type="xsd:long">10</SHAREVOLUME>

<DIV></DIV>&gt; &gt; &gt; &gt; <NETPRICECHANGE xsi:type="xsd:double">0.0</NETPRICECHANGE>

<DIV></DIV>&gt; &gt; &gt; &gt; <PREVIOUSCLOSEPRICE DIV <>&gt;
&gt; &gt; &gt; xsi:type="xsd:double"&gt;55.25</PREVIOUSCLOSEPRICE> 
<DIV></DIV>&gt; &gt; &gt; &gt; </GETPRICERETURN>
<DIV></DIV>&gt; &gt; &gt; &gt; </ns1:getPriceResponse>
<DIV></DIV>&gt; &gt; &gt; &gt; </soapenv:Body>
<DIV></DIV>&gt; &gt; &gt; &gt; </soapenv:Envelope>
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; The problem should be obvious.
Instead of the expected qname 
<DIV></DIV>&gt; &gt; &gt; &gt; "NasdaqQuote", the return value
is called "getPriceReturn". 
<DIV></DIV>&gt; &gt; &gt; &gt; The type is 
<DIV></DIV>&gt; &gt; &gt; &gt; right, but the qname is wrong.
Under Axis 1.0, the qname was 
<DIV></DIV>&gt; &gt; &gt; &gt; NasdaqQuote. 
<DIV></DIV>&gt; &gt; &gt; &gt; What changed? 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; The reason I started having to
look into this is that I'm 
<DIV></DIV>&gt; &gt; &gt; getting the 
<DIV></DIV>&gt; &gt; &gt; &gt; following error when serializing
the response: 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; faultCode: 
<DIV></DIV>&gt; &gt; &gt; &gt; {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

<DIV></DIV>&gt; &gt; &gt; &gt; faultSubcode: 
<DIV></DIV>&gt; &gt; &gt; &gt; faultString: org.xml.sax.SAXException:
Bad types (class 
<DIV></DIV>&gt; &gt; &gt; &gt; NasdaqQuote -&gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; class java.lang.String) 
<DIV></DIV>&gt; &gt; &gt; &gt; faultActor: null 
<DIV></DIV>&gt; &gt; &gt; &gt; faultNode: null 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; Thoughts? 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; - James Snell 
<DIV></DIV>&gt; &gt; &gt; &gt; IBM Emerging Technologies 
<DIV></DIV>&gt; &gt; &gt; &gt; jasnell@us.ibm.com 
<DIV></DIV>&gt; &gt; &gt; &gt; (559) 587-1233 (office) 
<DIV></DIV>&gt; &gt; &gt; &gt; (700) 544-9035 (t/l) 
<DIV></DIV>&gt; &gt; &gt; &gt; Programming Web Services With SOAP

<DIV></DIV>&gt; &gt; &gt; &gt; O'Reilly &amp; Associates,
ISBN 0596000952 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; &gt; Have I not commanded you? Be strong
and courageous. 
<DIV></DIV>&gt; &gt; &gt; &gt; Do not be terrified, do not be
discouraged, for the Lord your 
<DIV></DIV>&gt; &gt; &gt; &gt; God will be with you whereever
you go. - Joshua 1:9 
<DIV></DIV>&gt; &gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; &gt; 
<DIV></DIV>&gt; &gt; 
<DIV></DIV></div><br clear=all><hr>MSN 8 helps eliminate e-mail
viruses.  <a href="http://g.msn.com/8HMMEN/2022">Get 2 months FREE*.</a> </html>

Mime
View raw message