我使用Eclipse的内置Web服务客户端创建器(我相信使用Apache Axis生成代码?)创建了一个Web服务客户端,我遇到了一个我似乎无法弄清楚的错误。以下是例外情况:
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: Call to a member function setValue() on a non-object
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:Call to a member function setValue() on a non-object
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.symplicity.oppsplace_demo.ws.job_api_php.JobWebServiceBindingStub.processJob(JobWebServiceBindingStub.java:280)
at com.symplicity.oppsplace_demo.ws.job_api_php.JobWebServicePortProxy.processJob(JobWebServicePortProxy.java:56)
at main.OppsPlaceIntegration.main(OppsPlaceIntegration.java:37)
我正在使用OppsPlace(职位发布网站)提供的API,特别是我使用此WSDL为其测试环境构建客户端。
基本上我创建了一个Job对象和一个Contact对象(从WSDL生成的类),它们与我的唯一ID一起传递给服务。无论我尝试在我的代码中进行更改,它都只会以同样的异常进行轰炸。
可以看出,异常发生在Apache代码内部,而对于我的生活,我无法弄清楚原因。有什么想法/想法吗?
答案 0 :(得分:2)
它提到'成员函数'而Java正式没有函数,只有方法。错误消息看起来像PHP'调用非对象上的成员函数'。 OppsPlace API在PHP中实现可能并非巧合。
恭喜,您遇到了正在调用的API中的错误。