axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Taylor" <watay...@alum.mit.edu>
Subject Re: Problem with axis and webservice. IpAddress is null
Date Fri, 15 Jun 2007 03:08:59 GMT
Are you using the tool that comes in the file named
axis2-eclipse-codegen-wizard?  That is the tool I am using because it
seems to be the best integrated with Eclipse, but I am having a VERY
hard time figuring out how to modify the generated stub Java files to
implement the service.  Do you know of any documentation that explains
how to do that?

The examples in the Axis2 download use a different version of
wsdl2java so their generated code is very different.

If you are using a different Eclipse plug-in whose generated Java is
documented, I could switch to it.

I would appreciate any hints you may have.

Thanks.

Bill Taylor

On 6/14/07, Arne Hansen <bsd.diverse@gmail.com> wrote:
> Hello axis experts
> I have just started using apaches axis framework to consume webservices. I
> find the whole setup very clever, although I have a problem.
> I am using eclipse as development tool, and the wdsl files I work with are
> https://api.betfair.com/global/v3/BFGlobalService.wsdl
> https://api.betfair.com/exchange/v3/BFExchangeService.wsdl
>
> I used the tool wdsl2java to generate the stub-classes, and I now try to use
> them.
> I am trying to call the service called "login", and I have the following
> code(only a subsection of the entire java-file)
>
> public static String login() throws Exception {
>
>         //Set up service calls
>         String sServiceName = "login";
>
>         javax.xml.rpc.Service service =
> ServiceFactory.newInstance().createService(new QName(sServiceName));
>         BFGlobalService_BindingStub stub = new
> BFGlobalService_BindingStub(new URL(_sEndPointURLGlobal), service);
>
>         //Assign login parameters
>         LoginReq req = new LoginReq();
>         req.setUsername (_sUsername);
>         req.setPassword(_sPassword);
>         req.setProductId(_sProductID);
>
>         //Make the call
>         try {
>             LoginResp resp = stub.login(req);
>
>             //Check for errors & return result
>              if (resp.getErrorCode() == LoginErrorEnum.API_ERROR ||
> resp.getHeader().getErrorCode() != APIErrorEnum.OK)
>             {
>             return resp.getHeader().getErrorCode().toString();
>             }
>             else
>                 if (resp.getErrorCode() != LoginErrorEnum.OK)
>                     return resp.getErrorCode().toString();
>                 else
>                 {
>                     setHeader( resp.getHeader());
>                     acctCurrency.setCurrencyCode(resp.getCurrency());
>                     return "OK";
>                 }
>
>
>
>         } catch (Exception e) {
>             return "Error - " + e.getMessage();
>         }
>
>
>     }
>
> When I run this code I get the error
>
> java.io.IOException: Non nillable element 'ipAddress' is null.
>
> and I cannot understand what goes wrong. Could it be problems with my local
> network?
> I have pasted the entire stacktrace below
> Thank you very much for your help, and I hope to hear from you soon.
> -Best of regards
>
> - Exception:
> java.io.IOException: Non nillable element 'ipAddress' is null.
>     at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:228)
>     at
> org.apache.axis.encoding.SerializationContext.serializeActual
> (SerializationContext.java:1518)
>     at
> org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:994)
>     at
> org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java
> :815)
>     at
> org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
>     at
> org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
>     at
> org.apache.axis.message.MessageElement.output(MessageElement.java
> :1208)
>     at
> org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
>     at
> org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
>     at
> org.apache.axis.message.MessageElement.output(MessageElement.java
> :1208)
>     at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:314)
>     at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:268)
>     at
> org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:529)
>     at
> org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount
> (AttachmentsImpl.java:554)
>     at
> org.apache.axis.Message.getContentType(Message.java:486)
>     at
> org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
>     at org.apache.axis.transport.http.HTTPSender.invoke
> (HTTPSender.java:138)
>     at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>     at
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>     at org.apache.axis.SimpleChain.invoke
> (SimpleChain.java:83)
>     at
> org.apache.axis.client.AxisClient.invokeTransport(AxisClient.java:150)
>     at
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:289)
>     at org.apache.axis.client.Call.invokeEngine
> (Call.java:2838)
>     at org.apache.axis.client.Call.invoke(Call.java:2824)
>     at org.apache.axis.client.Call.invoke(Call.java:2501)
>     at org.apache.axis.client.Call.invoke(Call.java:2424)
>     at org.apache.axis.client.Call.invoke (Call.java:1835)
>     at
> com.betfair.www.publicapi.v3.BFGlobalService.BFGlobalService_BindingStub.login(BFGlobalService_BindingStub.java:1301)
>     at bsdBetting.General.login(General.java:449)
>     at bsdBetting.General.main (General.java:131)
> - Exception:
> AxisFault
>  faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: java.io.IOException: java.io.IOException: Non nillable element
> 'ipAddress' is null.
>  faultActor:
>  faultNode:
>  faultDetail:
>     {
> http://xml.apache.org/axis/}stackTrace:java.io.IOException:
> java.io.IOException: Non nillable element 'ipAddress' is null.
>     at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:288)
>     at
> org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1518)
>     at
> org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:994)
>     at
> org.apache.axis.encoding.SerializationContext.serialize
> (SerializationContext.java:815)
>     at
> org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
>     at
> org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
>     at org.apache.axis.message.MessageElement.output
> (MessageElement.java:1208)
>     at
> org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
>     at
> org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
>     at org.apache.axis.message.MessageElement.output
> (MessageElement.java:1208)
>     at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:314)
>     at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:268)
>     at
> org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:529)
>     at
> org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:554)
>     at
> org.apache.axis.Message.getContentType(Message.java:486)
>     at
> org.apache.axis.transport.http.HTTPSender.writeToSocket
> (HTTPSender.java:343)
>     at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
>     at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>     at org.apache.axis.SimpleChain.doVisiting
> (SimpleChain.java:118)
>     at
> org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>     at
> org.apache.axis.client.AxisClient.invokeTransport(AxisClient.java:150)
>     at org.apache.axis.client.AxisClient.invoke(
> AxisClient.java:289)
>     at
> org.apache.axis.client.Call.invokeEngine(Call.java:2838)
>     at org.apache.axis.client.Call.invoke(Call.java:2824)
>     at org.apache.axis.client.Call.invoke(Call.java:2501)
>     at org.apache.axis.client.Call.invoke (Call.java:2424)
>     at org.apache.axis.client.Call.invoke(Call.java:1835)
>     at
> com.betfair.www.publicapi.v3.BFGlobalService.BFGlobalService_BindingStub.login(BFGlobalService_BindingStub.java:1301)
>     at bsdBetting.General.login (General.java:449)
>     at bsdBetting.General.main(General.java:131)
>
>     {http://xml.apache.org/axis/}hostname:LENOVO-03428958
>
> java.io.IOException: java.io.IOException: Non nillable element 'ipAddress'
> is null.
>     at
> org.apache.axis.AxisFault.makeFault(AxisFault.java:104)
>     at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:316)
>     at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:268)
>     at
> org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:529)
>     at
> org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java
> :554)
>     at
> org.apache.axis.Message.getContentType(Message.java:486)
>     at
> org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343)
>     at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java
> :138)
>     at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>     at
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>     at org.apache.axis.SimpleChain.invoke(SimpleChain.java
> :83)
>     at
> org.apache.axis.client.AxisClient.invokeTransport(AxisClient.java:150)
>     at
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:289)
>     at
> org.apache.axis.client.Call.invokeEngine(Call.java:2838)
>     at org.apache.axis.client.Call.invoke(Call.java:2824)
>     at org.apache.axis.client.Call.invoke(Call.java:2501)
>     at org.apache.axis.client.Call.invoke(Call.java:2424)
>     at org.apache.axis.client.Call.invoke (Call.java:1835)
>     at
> com.betfair.www.publicapi.v3.BFGlobalService.BFGlobalService_BindingStub.login(BFGlobalService_BindingStub.java:1301)
>     at bsdBetting.General.login(General.java:449)
>     at bsdBetting.General.main (General.java:131)
> Caused by: java.io.IOException: java.io.IOException: Non nillable element
> 'ipAddress' is null.
>     at
> org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:288)
>     at
> org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1518)
>     at
> org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:994)
>     at
> org.apache.axis.encoding.SerializationContext.serialize
> (SerializationContext.java:815)
>     at
> org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
>     at
> org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
>     at org.apache.axis.message.MessageElement.output
> (MessageElement.java:1208)
>     at
> org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
>     at
> org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
>     at org.apache.axis.message.MessageElement.output
> (MessageElement.java:1208)
>     at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:314)
>     ... 19 more
> - Exception:
> java.io.IOException: Non nillable element 'ipAddress' is null.
>     at
> org.apache.axis.encoding.ser.BeanSerializer.serialize
> (BeanSerializer.java:228)
>     at
> org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1518)
>     at
> org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java
> :994)
>     at
> org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:815)
>     at
> org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
>     at org.apache.axis.message.RPCElement.outputImpl
> (RPCElement.java:433)
>     at
> org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
>     at
> org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
>     at org.apache.axis.message.SOAPEnvelope.outputImpl
> (SOAPEnvelope.java:478)
>     at
> org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
>     at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:314)
>     at org.apache.axis.SOAPPart.writeTo(SOAPPart.java :268)
>     at
> org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:529)
>     at
> org.apache.axis.SOAPPart.getContentLength(SOAPPart.java:228)
>     at
> org.apache.axis.Message.getContentLength(Message.java:510)
>     at
> org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:371)
>     at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
>     at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java
> :32)
>     at
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>     at
> org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>     at
> org.apache.axis.client.AxisClient.invokeTransport(AxisClient.java:150)
>     at
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:289)
>     at
> org.apache.axis.client.Call.invokeEngine(Call.java:2838)
>     at org.apache.axis.client.Call.invoke(Call.java:2824)
>     at org.apache.axis.client.Call.invoke (Call.java:2501)
>     at org.apache.axis.client.Call.invoke(Call.java:2424)
>     at org.apache.axis.client.Call.invoke(Call.java:1835)
>     at
> com.betfair.www.publicapi.v3.BFGlobalService.BFGlobalService_BindingStub.login
> (BFGlobalService_BindingStub.java:1301)
>     at bsdBetting.General.login(General.java:449)
>     at bsdBetting.General.main(General.java:131)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message