You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by John Joseph <jo...@yahoo.com> on 2007/08/13 22:23:46 UTC

Illegal argument exception Local part can not be null when creating QName

Hi,
I am new to Axis. I reaaly appreciate if some one can tell me what am I doing wrong here!

I get the following error when I deploy the web service using ant task <axis-admin>. Created the wsdd using wdsl2java. I have attached my wsdl too.

C:\Program Files\Active Endpoints\ActiveBPEL Designer\Server\ActiveBPEL_Tomcat\w
ebapps\SampleService>ant deploy
Buildfile: build.xml
deploy:
[axis-admin] - Unable to find required classes (javax.activation.DataHandler and
 javax.mail.internet.MimeMultipart). Attachment support is disabled.
[axis-admin] Processing file C:\Program Files\Active Endpoints\ActiveBPEL Design
er\Server\ActiveBPEL_Tomcat\webapps\SampleService\WEB-INF\classes\com\localhost\
ss\deploy.wsdd
[axis-admin] AxisFault
[axis-admin]  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userE
xception
[axis-admin]  faultSubcode:
[axis-admin]  faultString: java.lang.IllegalArgumentException: local part cannot
 be &quot;null&quot; when creating a QName
[axis-admin]  faultActor:
[axis-admin]  faultNode:
[axis-admin]  faultDetail:
[axis-admin]    {http://xml.apache.org/axis/}hostname:JoyJoseph
[axis-admin] Running axis-admin with parameters:
[axis-admin]   action:
[axis-admin]   url:http://localhost:8080/active-bpel/servlet/AxisServlet
[axis-admin]   hostname:null
[axis-admin]   port:0
[axis-admin]   servletPath:null
[axis-admin]   fileProtocol:null
[axis-admin]   username:null
[axis-admin]   password:null
[axis-admin]   transportChain:null
[axis-admin]   debug:false

WSDL

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://localhost/ss/" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SampleService"
targetNamespace="http://localhost/ss/">
<wsdl:types>
<xsd:schema targetNamespace="http://localhost/ss/">
<xsd:element name="concatRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="s1" type="xsd:string"></xsd:element>
<xsd:element name="s2" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="concatRequest">
<wsdl:part element="tns:concatRequest" name="concatRequest"/>
</wsdl:message>
<wsdl:message name="concatResponse">
<wsdl:part type="xsd:string" name="concatResponse" />
</wsdl:message>
<wsdl:portType name="SampleService">
<wsdl:operation name="concat">
<wsdl:input message="tns:concatRequest"/>
<wsdl:output message="tns:concatResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SampleServiceSOAP" type="tns:SampleService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="concat">
<soap:operation soapAction="http://localhost/ss/concat"/>
<wsdl:input>
<soap:body parts="concatRequest" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body parts="concatResponse" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SampleService">
<wsdl:port binding="tns:SampleServiceSOAP" name="SampleServiceSOAP">
<soap:address location="http://localhost:8080/active-bpel/services/SampleServiceSOAP"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Thanks,
John


       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting 

Re: Illegal argument exception Local part can not be null when creating QName

Posted by Martin Gainty <mg...@hotmail.com>.
QName is used as an arg to setOperationName of call e.g.
call.setOperationName(new QName("urn:soapservice", "getEvents"));

Qname is used to specify returnType in the call object
call.setReturnType(new QName("events"),java.lang.String.class);

if you are using aggregate or complex constructed Java Classes for the type.. you need to apprise the call object of this datatype thru RegisterTypeMapping

We can be more assistance if you show us the client code which is generated

HTH/
Martin
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

  ----- Original Message ----- 
  From: John Joseph 
  To: axis-user@ws.apache.org 
  Sent: Monday, August 13, 2007 4:23 PM
  Subject: Illegal argument exception Local part can not be null when creating QName


  Hi,
  I am new to Axis. I reaaly appreciate if some one can tell me what am I doing wrong here!

  I get the following error when I deploy the web service using ant task <axis-admin>. Created the wsdd using wdsl2java. I have attached my wsdl too.

  C:\Program Files\Active Endpoints\ActiveBPEL Designer\Server\ActiveBPEL_Tomcat\w
  ebapps\SampleService>ant deploy
  Buildfile: build.xml
  deploy:
  [axis-admin] - Unable to find required classes (javax.activation.DataHandler and
   javax.mail.internet.MimeMultipart). Attachment support is disabled.
  [axis-admin] Processing file C:\Program Files\Active Endpoints\ActiveBPEL Design
  er\Server\ActiveBPEL_Tomcat\webapps\SampleService\WEB-INF\classes\com\localhost\
  ss\deploy.wsdd
  [axis-admin] AxisFault
  [axis-admin]  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userE
  xception
  [axis-admin]  faultSubcode:
  [axis-admin]  faultString: java.lang.IllegalArgumentException: local part cannot
   be &quot;null&quot; when creating a QName
  [axis-admin]  faultActor:
  [axis-admin]  faultNode:
  [axis-admin]  faultDetail:
  [axis-admin]    {http://xml.apache.org/axis/}hostname:JoyJoseph
  [axis-admin] Running axis-admin with parameters:
  [axis-admin]   action:
  [axis-admin]   url:http://localhost:8080/active-bpel/servlet/AxisServlet
  [axis-admin]   hostname:null
  [axis-admin]   port:0
  [axis-admin]   servletPath:null
  [axis-admin]   fileProtocol:null
  [axis-admin]   username:null
  [axis-admin]   password:null
  [axis-admin]   transportChain:null
  [axis-admin]   debug:false

  WSDL

  <?xml version="1.0" encoding="UTF-8"?>

  <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://localhost/ss/" 

  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SampleService"

  targetNamespace="http://localhost/ss/">

  <wsdl:types>

  <xsd:schema targetNamespace="http://localhost/ss/">

  <xsd:element name="concatRequest">

  <xsd:complexType>

  <xsd:sequence>

  <xsd:element name="s1" type="xsd:string"></xsd:element>

  <xsd:element name="s2" type="xsd:string"></xsd:element>

  </xsd:sequence>

  </xsd:complexType>

  </xsd:element>

  </xsd:schema>

  </wsdl:types>


  <wsdl:message name="concatRequest">

  <wsdl:part element="tns:concatRequest" name="concatRequest"/>

  </wsdl:message>


  <wsdl:message name="concatResponse">

  <wsdl:part type="xsd:string" name="concatResponse" />

  </wsdl:message>


  <wsdl:portType name="SampleService">

  <wsdl:operation name="concat">

  <wsdl:input message="tns:concatRequest"/>

  <wsdl:output message="tns:concatResponse"/>

  </wsdl:operation>

  </wsdl:portType>


  <wsdl:binding name="SampleServiceSOAP" type="tns:SampleService">

  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

  <wsdl:operation name="concat">

  <soap:operation soapAction="http://localhost/ss/concat"/>

  <wsdl:input>

  <soap:body parts="concatRequest" use="literal"/>

  </wsdl:input>

  <wsdl:output>

  <soap:body parts="concatResponse" use="literal"/>

  </wsdl:output>

  </wsdl:operation>

  </wsdl:binding>


  <wsdl:service name="SampleService">

  <wsdl:port binding="tns:SampleServiceSOAP" name="SampleServiceSOAP">

  <soap:address location="http://localhost:8080/active-bpel/services/SampleServiceSOAP"/>

  </wsdl:port>

  </wsdl:service>

  </wsdl:definitions>



  Thanks,

  John




------------------------------------------------------------------------------
  Luggage? GPS? Comic books? 
  Check out fitting gifts for grads at Yahoo! Search.