Hi Nitin,
I see a couple of problems you want to address.
1. Always define the encoding in your xml header i.e.
<?xml version="1.0" encoding="UTF-8"?>
Both UTF-8 and UTF-16 are acceptable but I suggest UTF-8 because of some
problems. This will not solve your problem.
2. In your message definition you have defined both the request and response to
have parts name body. Under the rules this mapps to an IN/OUT type and a helper
class will be generated to contain the type, but, you have defined to entirely
different types for the content.
I am assuming what you want is a WSDL file to represent the following call
signature.
public float getTradePrice(String stock)
What you need to do is change the name of the Response message body part to not
be called body ie call it return,
what you have here is a method that looks like this to the client od the WSDL
void getTradePrice(BodyHelper body);
Hope this helps
Regards
Steve
Quoting Dario Di Minno <[EMAIL PROTECTED]>:
> Hi Nitin,
> as I can see from your output, there are some unwanted spare '>'
> characters, like in....
>
> "{http://localhost:8080/jboost/stockquote.xsd}>TradePriceRequest", with...
>
> To eliminate this problem, you have to clean up the files produced by
> WSDL2Java from these '>';
> then compile java files, deploy the web service and retry
>
> Dario
>
>
>
> Nitin Mulimani ha scritto:
>
> >Hi,
> >
> >I posted a similar message earlier, but yet to hear some response :-)
> >
> >Anyways, I tried to generate WS from sample WSDL (section 1.2) in WSDL
> >specs, but have not been successful.
> >
> >I have placed the wsdl at http://localhost:8080/jboost/stockquote.wsdl
> >And my server side classes are in
> >tomcat/webapps/jboost/WEB-INF/classes/server folder.
> >
> >Since the element definition is included in the wsdl, I am not able to
> >understand why I am getting this error. Am I referring to the
> >"namespace" or "schema" in a proper way.
> >
> >Thanks for your help in advance.
> >
> >-- Nitin
> >
> >Fault - makeTypeElement() was told to create a type
> >"{http://localhost:8080/jboost/stockquote.xsd}>TradePriceRequest", with
> >no containing element
> >AxisFault
> > faultCode:
> >{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
> > faultSubcode:
> > faultString: makeTypeElement() was told to create a type
> >"{http://localhost:8080/jboost/stockquote.xsd}>TradePriceRequest", with
> >no containing element
> > faultActor:
> > faultNode:
> > faultDetail:
> >
> ><?xml version="1.0"?>
> ><definitions name="StockQuote"
> >
> >targetNamespace="http://localhost:8080/jboost/stockquote.wsdl"
> > xmlns:tns="http://localhost:8080/jboost/stockquote.wsdl"
> > xmlns:xsd1="http://localhost:8080/jboost/stockquote.xsd"
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > xmlns="http://schemas.xmlsoap.org/wsdl/">
> >
> > <types>
> > <schema
> >targetNamespace="http://localhost:8080/jboost/stockquote.xsd"
> > xmlns="http://www.w3.org/2001/XMLSchema">
> > <element name="TradePriceRequest">
> > <complexType>
> > <all>
> > <element name="tickerSymbol" type="string"/>
> > </all>
> > </complexType>
> > </element>
> > <element name="TradePrice">
> > <complexType>
> > <all>
> > <element name="price" type="float"/>
> > </all>
> > </complexType>
> > </element>
> > </schema>
> > </types>
> >
> > <message name="GetLastTradePriceInput">
> > <part name="body" element="xsd1:TradePriceRequest"/>
> > </message>
> >
> > <message name="GetLastTradePriceOutput">
> > <part name="body" element="xsd1:TradePrice"/>
> > </message>
> >
> > <portType name="StockQuotePortType">
> > <operation name="GetLastTradePrice">
> > <input message="tns:GetLastTradePriceInput"/>
> > <output message="tns:GetLastTradePriceOutput"/>
> > </operation>
> > </portType>
> >
> > <binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
> > <soap:binding style="document"
> >transport="http://schemas.xmlsoap.org/soap/http"/>
> > <operation name="GetLastTradePrice">
> > <soap:operation
> >soapAction="http://localhost:8080/jboost/GetLastTradePrice"/>
> > <input>
> > <soap:body use="literal"/>
> > </input>
> > <output>
> > <soap:body use="literal"/>
> > </output>
> > </operation>
> > </binding>
> >
> > <service name="StockQuoteService">
> > <documentation>My first service</documentation>
> > <port name="StockQuotePort" binding="tns:StockQuoteSoapBinding">
> > <soap:address
> >location="http://localhost:8080/jboost/stockquote"/>
> > </port>
> > </service>
> >
> ></definitions>
> >
> >
> >
>
>
---------------------------------------------------
This message was sent using Spansurf Web Mail
Internet access in Spain - http://www.spansurf.com/