Hi all,

I recently posted a question about how to send xml docs and since learned about 
Jibx.  I am now trying to use jibx with and get the following error when 
building my client clode:

/c/build/Jwsdl.a/src> gmake generate.clientclass
/usr/local/packages/Apache/axis2/1.3/bin/wsdl2javant.sh -d jibx -Ebindingfile 
com/company/product/ws/ncm/binding.xml -o ../c
lient -uri com/company/product/ws/ncm/NcmService.wsdl -p ncm ; \
Using AXIS2_HOME:   C:/cygwin/usr/local/packages/Apache/axis2/1.3
Using JAVA_HOME:    C:/cygwin/usr/local/packages/sun/jdk/1.6.0/Windows_NT/4.x
Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
java.lang.RuntimeException: No mapping
 defined for element {http://NcmService.com/xsd}getLastKnownConfig
        at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:265)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.lang.RuntimeException: No mapping defined for element 
{http://NcmService.com/xsd}getLastKnownConfig
        at 
org.apache.axis2.jibx.CodeGenerationUtility.mapQName(CodeGenerationUtility.java:1044)
        at 
org.apache.axis2.jibx.CodeGenerationUtility.mapMessage(CodeGenerationUtility.java:1030)
        at 
org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtility.java:413)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExtension.java:77)
        at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)

I built my client code with 
$(AXIS2_HOME)/bin/wsdl2javant.sh -d jibx -Ebindingfile 
com/company/product/ws/ncm/binding.xml -o ../client -uri 
com/company/product/ws/ncm/NcmService.wsdl -p ncm ; \

I built my server classes using java2wsdl in a ant build file
<target name="generate.wsdl" depends="compile.service">

<taskdef name="java2wsdl" classname="org.apache.ws.java2wsdl.Java2WSDLTask" 
classpathref="axis2.classpath"/>

<java2wsdl className="com.company.product.ws.ncm.NcmService" 
outputLocation="com/company/product/ws/ncm" 
targetNamespace="http://NcmService.com/xsd"; 
schemaTargetNamespace="http://NcmService.com/xsd";>

<classpath>

<pathelement path="${axis2.classpath}"/>

<pathelement location="."/>

</classpath>

</java2wsdl>


Here is the wsdl generated by java2wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:ns1="http://ncm.ws.product.company.com/xsd"; 
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
xmlns:ns0="http://NcmService.com/xsd"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; 
targetNamespace="http://NcmService.com/xsd";>
    <wsdl:types>
        <xs:schema xmlns:ns="http://NcmService.com/xsd"; 
targetNamespace="http://NcmService.com/xsd"; attributeFormDefault="qualified" 
elementFormDefault="qualified">
            <xs:element name="getLastKnownConfig">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="ipAddresses" maxOccurs="unbounded" 
minOccurs="0" type="ns1:NcmService$NcmRequestData" nillable="true"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="getLastKnownConfigResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="return" maxOccurs="unbounded" 
minOccurs="0" type="ns1:NcmService$NcmResponseData" nillable="true"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
        <xs:schema xmlns:ax21="http://ncm.ws.product.company.com/xsd"; 
targetNamespace="http://ncm.ws.product.company.com/xsd"; 
attributeFormDefault="qualified" elementFormDefault="qualified">
            <xs:complexType name="NcmService$NcmRequestData">
                <xs:sequence>
                    <xs:element name="strIpAddress" minOccurs="0" 
type="xs:string" nillable="true"/>
                </xs:sequence>
            </xs:complexType>
            <xs:complexType name="NcmService$NcmResponseData">
                <xs:sequence>
                    <xs:element name="iError" minOccurs="0" type="xs:int"/>
                    <xs:element name="strConfiruationData" minOccurs="0" 
type="xs:string" nillable="true"/>
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="getLastKnownConfigRequest">
        <wsdl:part name="parameters" element="ns0:getLastKnownConfig"/>
    </wsdl:message>
    <wsdl:message name="getLastKnownConfigResponse">
        <wsdl:part name="parameters" element="ns0:getLastKnownConfigResponse"/>
    </wsdl:message>
    <wsdl:portType name="NcmServicePortType">
        <wsdl:operation name="getLastKnownConfig">
            <wsdl:input message="ns0:getLastKnownConfigRequest" 
wsaw:Action="urn:getLastKnownConfig"/>
            <wsdl:output message="ns0:getLastKnownConfigResponse" 
wsaw:Action="urn:getLastKnownConfigResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="NcmServiceSOAP11Binding" type="ns0:NcmServicePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
        <wsdl:operation name="getLastKnownConfig">
            <soap:operation soapAction="urn:getLastKnownConfig" 
style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="NcmServiceSOAP12Binding" type="ns0:NcmServicePortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document"/>
        <wsdl:operation name="getLastKnownConfig">
            <soap12:operation soapAction="urn:getLastKnownConfig" 
style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="NcmServiceHttpBinding" type="ns0:NcmServicePortType">
        <http:binding verb="POST"/>
        <wsdl:operation name="getLastKnownConfig">
            <http:operation location="NcmService/getLastKnownConfig"/>
            <wsdl:input>
                <mime:content type="text/xml" part="getLastKnownConfig"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="text/xml" part="getLastKnownConfig"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="NcmService">
        <wsdl:port name="NcmServiceSOAP11port_http" 
binding="ns0:NcmServiceSOAP11Binding">
            <soap:address 
location="http://localhost:8080/axis2/services/NcmService"/>
        </wsdl:port>
        <wsdl:port name="NcmServiceSOAP12port_http" 
binding="ns0:NcmServiceSOAP12Binding">
            <soap12:address 
location="http://localhost:8080/axis2/services/NcmService"/>
        </wsdl:port>
        <wsdl:port name="NcmServiceHttpport" 
binding="ns0:NcmServiceHttpBinding">
            <http:address 
location="http://localhost:8080/axis2/services/NcmService"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

All help appreciated. :-)

Jon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to