Title: Aliaswire Signature
Thanks for the suggestion but I get the same error. BTW I'm using axis2 1.2 release.

-Alex

Anne Thomas Manes wrote:
To import a schema with no namespace, try this:
<s:import namespace="" />

Anne

On 7/27/07, Alex Rodriguez <[EMAIL PROTECTED]> wrote:
  
Hi all,

I have a wsdl that imports a schema with no namespace; I've included a
sample at the bottom of this email. Trying to generate a client stub fails
with both xmlbeans and adb, the error is:

Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:256)
        at
org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
        at
org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
        at
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:103)
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:209)
        ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
        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:585)
        at
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
        ... 3 more
Caused by: java.lang.RuntimeException:
org.apache.xmlbeans.XmlException: error: src-resolve.a:
Could not find element '[EMAIL PROTECTED]://some.namespace'.
Do you mean to refer to the element named AccountBOS?
        at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:310)
        ... 8 more
Caused by: org.apache.xmlbeans.XmlException: error:
src-resolve.a: Could not find element
'[EMAIL PROTECTED]://some.namespace'. Do you mean to refer to
the element named AccountBOS?
        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
        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:585)
        at
org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
        at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:174)

I've independently run xmlbeans generation on this and it succeeds,
correctly generating AccountBOS in noNamespace. The problem with wsdl2java
is that the reference to AccountBOS is being assigned a namespace when it
shouldn't be, this is an import, not an include. I couldn't find a bug
logged for this specific error. Any pointers or help on this would be
greatly appreciated.

Thanks,
Alex

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns=""
xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/"
xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://some.namespace"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://some.namespace">
  <wsdl:types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="AccountBOS">
        <xs:complexType>
            <xs:sequence>
                <xs:element type="xs:long" name="Account_ID"/>
            </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    <s:schema elementFormDefault="qualified"
targetNamespace="http://some.namespace"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:acc="http://some.namespace">
      <s:import/>
      <s:element name="getAccount">
        <s:complexType>
          <s:sequence>
            <s:element ref="AccountBOS"/>
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="getAccountSoapIn">
      <wsdl:part name="parameters" element="s0:getAccount"/>
    </wsdl:message>
  <wsdl:message name="getAccountSoapOut">
    <wsdl:part name="parameters" element="s0:getAccount"/>
  </wsdl:message>
  <wsdl:portType name="AccountServiceSoap">
    <wsdl:operation name="getAccount">
      <wsdl:input message="s0:getAccountSoapIn"/>
      <wsdl:output message="s0:getAccountSoapOut"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="AccountServiceSoap" type="s0:AccountServiceSoap">
    <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
    <wsdl:operation name="getAccount">
      <soap:operation
soapAction="http://some.namespace/getAccount"
style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
    <wsdl:service name="AccountService">
    <wsdl:port name="AccountServiceSoap"
binding="s0:AccountServiceSoap">
      <soap:address
location="http://localhost:7001/AccountService.jws"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


    

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

  

--
Alex Rodriguez
Aliaswire Inc.
10 Canal Park
Cambridge, MA 02141
617.850.9509
[EMAIL PROTECTED]
http://www.aliaswire.com
begin:vcard
fn:Alex Rodriguez
n:Rodriguez;Alex
org:Aliaswire, Inc.
adr;dom:;;10 Canal Park;Cambridge;MA;02141
email;internet:[EMAIL PROTECTED]
tel;work:617.850.9509
x-mozilla-html:TRUE
version:2.1
end:vcard


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

Reply via email to