axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arne Hansen" <bsd.dive...@gmail.com>
Subject Problem with axis and webservice. IpAddress is null
Date Thu, 14 Jun 2007 06:38:29 GMT
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<http://schemas.xmlsoap.org/soap/envelope/%7DServer.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:<http://xml.apache.org/axis/%7DstackTrace: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<http://xml.apache.org/axis/%7Dhostname: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)

Mime
View raw message