On 10/31/07, npwork <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I found out two more issues
>
> 1) The outputDirectory should be
> <outputDirectory>target/generated-sources</outputDirectory>  instead of
> <outputDirectory>target/generated-sources/jaxws</outputDirectory>. If you
> keep the jaxws in there, the generated classes package structure does not
> conform and you will get compilation errors.

Yeah, you may be correct. My recollection may be incorrect as it's
been a while since I built the pricing service. Though I know I use
target/generated-source/jaxws and target/generated-source/jaxb in a
different project right now without issue. But I'm using CXF instead
of XFire.

> 2) After you generate the sources, in Pricing.java, the getPrice method is
> generated with output of type BigDecimal ....as per the WSDL the output type
> should be getPriceResponse

Hmm, that's definitely not correct (the BigDecimal as the return
type). Are you sure your WSDL is not goofed up somehow? Below is a
WSDL that should work:

---------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
        xmlns:tns="http://www.mycompany.com";
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"; name="PricingService"
        targetNamespace="http://www.mycompany.com";>
        <wsdl:documentation></wsdl:documentation>

        <wsdl:types>
                <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
                        targetNamespace="http://www.mycompany.com";>
                        <xsd:element name="getPriceRequest">
                                <xsd:complexType>
                                        <xsd:sequence>

                                                <xsd:element name="ticker" 
type="xsd:string"></xsd:element>
                                                <xsd:element name="date" 
type="xsd:date"></xsd:element>
                                        </xsd:sequence>
                                </xsd:complexType>
                        </xsd:element>
                        <xsd:element name="getPriceResponse">
                                <xsd:complexType>
                                        <xsd:sequence>

                                                <xsd:element name="source" 
type="xsd:string"></xsd:element>
                                                <xsd:element name="price" 
type="xsd:decimal"></xsd:element>
                                        </xsd:sequence>
                                </xsd:complexType>
                        </xsd:element>
                </xsd:schema>
        </wsdl:types>
        <wsdl:message name="getPriceRequest">
                <wsdl:part name="parameters" 
element="tns:getPriceRequest"></wsdl:part>
        </wsdl:message>
        <wsdl:message name="getPriceResponse">
                <wsdl:part name="parameters" 
element="tns:getPriceResponse"></wsdl:part>
        </wsdl:message>
        <wsdl:portType name="Pricing">
                <wsdl:operation name="getPrice">
                        <wsdl:input message="tns:getPriceRequest"></wsdl:input>
                        <wsdl:output 
message="tns:getPriceResponse"></wsdl:output>
                </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="PricingBinding" type="tns:Pricing">
                <soap:binding style="document"
                        transport="http://schemas.xmlsoap.org/soap/http"; />
                <wsdl:operation name="getPrice">
                        <soap:operation
                                soapAction="http://www.mycompany.com/getPrice"; 
/>
                        <wsdl:input>
                                <soap:body use="literal" />
                        </wsdl:input>
                        <wsdl:output>
                                <soap:body use="literal" />
                        </wsdl:output>
                </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="PricingService">
                <wsdl:port name="PricingPort" binding="tns:PricingBinding">
                        <soap:address location="http://localhost:8192/pricing/"; 
/>
                </wsdl:port>
        </wsdl:service>
</wsdl:definitions>
---------------------------------------------------------------------------------------------------------------

Compare yours to the one above.

Bruce
-- 
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Castor - http://castor.org/

Reply via email to