Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2633

wscompile fails to create valid package name where namespace contains capitalised reserved keyword

XMLWordPrintable

    • Hide

      If the namespace problem only affects the types and not the service or SEI a JAXB customisation can be used to map the schema to a different package: -

      e.g.

      <jxb:bindings version="1.0" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
      xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

      <jxb:bindings schemaLocation="PersonWSService.wsdl#types?schema1">
      <jxb:schemaBindings>
      <jxb:package name="com.test.customized.a"/>
      </jxb:schemaBindings>
      </jxb:bindings>

      </jxb:bindings>

      Show
      If the namespace problem only affects the types and not the service or SEI a JAXB customisation can be used to map the schema to a different package: - e.g. <jxb:bindings version="1.0" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <jxb:bindings schemaLocation="PersonWSService.wsdl#types?schema1"> <jxb:schemaBindings> <jxb:package name="com.test.customized.a"/> </jxb:schemaBindings> </jxb:bindings> </jxb:bindings>

      This issue requires a change to JAXB as identified in: -

      https://jax-ws.dev.java.net/issues/show_bug.cgi?id=599

      The namespace 'http://examples/Public/ejb3/' is mapped to 'examples.public.ejb3' which causes wscompile to fail with the following error: -

      [ERROR] The package name 'examples.public.ejb3' used for this schema is not a valid package name.
      line 4 of file:ExampleService.wsdl

              rhn-support-asoldano Alessio Soldano
              darran.lofthouse@redhat.com Darran Lofthouse
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: