The type mapping defines "NasdaqQuote" as the local part of the *type* QName.

The "getPriceReturn" element name has nothing to do with the type mapping, that's the 
default (operationName + "Return") for operations with no "returnQName" specified in 
the WSDD.  You can change it by adding to the WSDD:

  <operation name="getPrice" returnQName="ns:NasdaqQuote" xmlns:ns="whatever"/>

This hasn't changed since 1.0.  Are you starting from a WSDL here, or coding manually? 
 If the former, something may have changed wrt the WSDL2Java handling....?

--Glen

> -----Original Message-----
> From: James M Snell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 3:27 PM
> To: [EMAIL PROTECTED]
> Subject: Bean Mapping Issues
> 
> 
> Hmm.. I'm trying to chase down a problem I'm having with a 
> bean mapping 
> declaration and want to see if anyone else can spot the problem right 
> away.
> 
> The service worked perfectly with Axis 1.0 and doesn't work now.
> 
> Here's the deploy.wsdd
> 
>     <deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/";
>         xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
>       <service name="quote" provider="java:RPC">
>         <parameter value="NasdaqQuotes" name="className"/>
>         <parameter value="getPrice" name="allowedMethods"/>
>       </service>
>       <beanMapping
>         xmlns:nq="urn:NasdaqQuotes-types"
>         languageSpecificType="java:NasdaqQuote"
>         qname="nq:NasdaqQuote"/>
>     </deployment>
> 
> The "quote" service's "getPrice" method returns a NasdaqQuote 
> object that 
> has been mapped to the "urn:NasdaqQuotes-types" namespace 
> using the qname 
> "NasdaqQuote".... however, below is the SOAP message that I'm 
> getting in 
> response:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>  <soapenv:Body>
>   <ns1:getPriceResponse 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
> xmlns:ns1="http://NasdaqQuotes-Interface";>
>    <getPriceReturn xsi:type="ns2:NasdaqQuote" 
> xmlns:ns2="urn:NasdaqQuotes-types">
>     <todaysHigh xsi:type="xsd:double">55.25</todaysHigh>
>     <fiftyTwoWeekHigh xsi:type="xsd:double">55.25</fiftyTwoWeekHigh>
>     <tradingStatus xsi:type="xsd:string">ACTIVE</tradingStatus>
>     <symbol xsi:type="xsd:string">XXX</symbol>
>     <totalShares xsi:type="xsd:long">100</totalShares>
>     <market xsi:type="xsd:string">NYSE</market>
>     <todaysLow xsi:type="xsd:double">55.25</todaysLow>
>     <issuerWebSite xsi:type="xsd:string">none</issuerWebSite>
>     <errorText xsi:type="xsd:string"></errorText>
>     <fiftyTwoWeekLow xsi:type="xsd:double">55.25</fiftyTwoWeekLow>
>     <lastSalePrice xsi:type="xsd:double">55.25</lastSalePrice>
>     <netPercentChange xsi:type="xsd:string">0</netPercentChange>
>     <shareVolume xsi:type="xsd:long">10</shareVolume>
>     <netPriceChange xsi:type="xsd:double">0.0</netPriceChange>
>     <previousClosePrice 
> xsi:type="xsd:double">55.25</previousClosePrice>
>    </getPriceReturn>
>   </ns1:getPriceResponse>
>  </soapenv:Body>
> </soapenv:Envelope>
> 
> The problem should be obvious.  Instead of the expected qname 
> "NasdaqQuote", the return value is called "getPriceReturn".  
> The type is 
> right, but the qname is wrong.  Under Axis 1.0, the qname was 
> NasdaqQuote. 
>  What changed?
> 
> The reason I started having to look into this is that I'm getting the 
> following error when serializing the response:
> 
>   faultCode: 
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>   faultSubcode:
>   faultString: org.xml.sax.SAXException: Bad types (class 
> NasdaqQuote -> 
> class java.lang.String)
>   faultActor: null
>   faultNode: null
> 
> Thoughts?
> 
> - James Snell
>      IBM Emerging Technologies
>      [EMAIL PROTECTED]
>      (559) 587-1233 (office)
>      (700) 544-9035 (t/l)
>      Programming Web Services With SOAP
>          O'Reilly & Associates, ISBN 0596000952
> 
>      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 whereever you go.    - Joshua 1:9
> 

Reply via email to