users@jax-ws.java.net

RE: Example custom-server.xml bindings file

From: Ryan LeCompte <Ryan.LeCompte_at_pangonetworks.com>
Date: Wed, 16 Aug 2006 13:50:03 -0400

So I'm getting a little further along with this, however I'm still unable to make the imported XSD types written into their own specific package. Take a look at my custom-server.xml bindings file:
 
<bindings
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    wsdlLocation="TestService.wsdl"
    xmlns="http://java.sun.com/xml/ns/jaxws">
    <bindings node="wsdl:definitions">
        <package name="com.service.core"/>
    </bindings>
    <bindings node="wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://www.company.com/MyService]">
        <jaxb:schemaBindings>
            <jaxb:package name="com.service.core"/>
        </jaxb:schemaBindings>
    </bindings>
        <bindings node="xsd:schema[@targetNamespace='http://www.company.com/MyService/Common]">
        <jaxb:schemaBindings>
            <jaxb:package name="com.service.common"/>
        </jaxb:schemaBindings>
    </bindings>
</bindings>
 
And I get the following error:
 
 [wsimport] error: XPath evaluation of "xsd:schema[@targetNamespace='http://www.company.com/MyService/Common']" results in empty target node
 
Notice that the namespaces of the main wsdl and imported xsd are different. Any help is appreciated.
 
Thanks,
Ryan
 

________________________________

From: Ryan LeCompte
Sent: Wed 8/16/2006 9:35 AM
To: users_at_jax-ws.dev.java.net
Subject: Example custom-server.xml bindings file


Hello all,
 
Does anyone have any example custom-server.xml bindings file for a WSDL that uses xsd:import in the WSDL file to import an XSD file? I'm having a hard time translating the following JWSDP 1.6 config.xml file into a proper customer-server.xml bindings file:
 
<?xml version="1.0" encoding="UTF-8" ?>
<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <wsdl location="MyService.wsdl"
          packageName="com.myservice.generated.server">
          <namespaceMappingRegistry>
             <namespaceMapping namespace="http://www.company.com/services/common" packageName="com.myservice.common.generated.server"/>
          </namespaceMappingRegistry>
     </wsdl>
</configuration>

Thanks,
Ryan