大侠帮忙看webservice调用存在什么问题

问题描述

wsdl地址:http://169.169.19.128:8070/axis/services/ShipArrive?wsdl内容如下:<?xmlversion="1.0"encoding="UTF-8"?>-<wsdl:definitionstargetNamespace="http://169.169.19.128:8070/axis/services/ShipArrive"xmlns:apachesoap="http://xml.apache.org/xml-soap"xmlns:impl="http://169.169.19.128:8070/axis/services/ShipArrive"xmlns:intf="http://169.169.19.128:8070/axis/services/ShipArrive"xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"xmlns:tns1="urn:AnalyzeShipArriveTime"xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"xmlns:xsd="http://www.w3.org/2001/XMLSchema">-<!--WSDLcreatedbyApacheAxisversion:1.4BuiltonApr22,2006(06:55:48PDT)-->-<wsdl:types>+<schematargetNamespace="http://169.169.19.128:8070/axis/services/ShipArrive"xmlns="http://www.w3.org/2001/XMLSchema"><importnamespace="urn:AnalyzeShipArriveTime"/><importnamespace="http://schemas.xmlsoap.org/soap/encoding/"/>-<complexTypename="ArrayOf_xsd_string">-<complexContent>-<restrictionbase="soapenc:Array"><attributeref="soapenc:arrayType"wsdl:arrayType="xsd:string[]"/></restriction></complexContent></complexType>-<complexTypename="ArrayOf_tns1_ShipArriveTime">-<complexContent>-<restrictionbase="soapenc:Array"><attributeref="soapenc:arrayType"wsdl:arrayType="tns1:ShipArriveTime[]"/></restriction></complexContent></complexType></schema>-<schematargetNamespace="urn:AnalyzeShipArriveTime"xmlns="http://www.w3.org/2001/XMLSchema"><importnamespace="http://169.169.19.128:8070/axis/services/ShipArrive"/><importnamespace="http://schemas.xmlsoap.org/soap/encoding/"/>-<complexTypename="ShipArriveTime">-<sequence><elementname="callsign"nillable="true"type="xsd:string"/><elementname="devicenum"nillable="true"type="xsd:string"/><elementname="did"type="xsd:int"/><elementname="dlat"nillable="true"type="xsd:string"/><elementname="dlon"nillable="true"type="xsd:string"/><elementname="eshipname"nillable="true"type="xsd:string"/><elementname="mmsi"nillable="true"type="xsd:string"/><elementname="regionid"nillable="true"type="xsd:string"/><elementname="shiplength"nillable="true"type="xsd:string"/><elementname="shipname"nillable="true"type="xsd:string"/><elementname="utc"nillable="true"type="xsd:string"/></sequence></complexType></schema></wsdl:types>-<wsdl:messagename="getArriveTimeResponse"><wsdl:partname="getArriveTimeReturn"type="impl:ArrayOf_tns1_ShipArriveTime"/></wsdl:message>-<wsdl:messagename="getArriveTimeRequest"><wsdl:partname="devicenums"type="impl:ArrayOf_xsd_string"/></wsdl:message>-<wsdl:portTypename="ShipArriveAction">-<wsdl:operationname="getArriveTime"parameterOrder="devicenums"><wsdl:inputmessage="impl:getArriveTimeRequest"name="getArriveTimeRequest"/><wsdl:outputmessage="impl:getArriveTimeResponse"name="getArriveTimeResponse"/></wsdl:operation></wsdl:portType>-<wsdl:bindingname="ShipArriveSoapBinding"type="impl:ShipArriveAction"><wsdlsoap:bindingstyle="rpc"transport="http://schemas.xmlsoap.org/soap/http"/>-<wsdl:operationname="getArriveTime"><wsdlsoap:operationsoapAction=""/>-<wsdl:inputname="getArriveTimeRequest"><wsdlsoap:bodyencodingStyle="http://schemas.xmlsoap.org/soap/encoding/"namespace="http://action.soa.com"use="encoded"/></wsdl:input>-<wsdl:outputname="getArriveTimeResponse"><wsdlsoap:bodyencodingStyle="http://schemas.xmlsoap.org/soap/encoding/"namespace="http://169.169.19.128:8070/axis/services/ShipArrive"use="encoded"/></wsdl:output></wsdl:operation></wsdl:binding>-<wsdl:servicename="ShipArriveActionService">-<wsdl:portbinding="impl:ShipArriveSoapBinding"name="ShipArrive"><wsdlsoap:addresslocation="http://169.169.19.128:8070/axis/services/ShipArrive"/></wsdl:port></wsdl:service></wsdl:definitions>代码如下/**创建日期2006-10-19**更改所生成文件模板为*窗口>首选项>Java>代码生成>代码和注释*/packagea_test;importjavax.xml.namespace.QName;importjavax.xml.rpc.ParameterMode;importjavax.xml.rpc.encoding.XMLType;importorg.apache.axis.encoding.ser.BeanDeserializerFactory;importorg.apache.axis.encoding.ser.BeanSerializerFactory;/***调用AIS提供给CBOS的AIS时间的WebService接口**@authorAdministrator**更改所生成类型注释的模板为窗口>首选项>Java>代码生成>代码和注释*/publicclassAISTimeService{publicstaticvoidmain(String[]args){ShipArriveTime[]a=getAISMessage_New(newString[]{"2329"});System.out.println(a.length);}publicstaticShipArriveTime[]getAISMessage_New(String[]devicenums){ShipArriveTime[]result=null;try{Stringendpoint="http://169.169.19.128:8070/axis/services/ShipArrive";org.apache.axis.client.Serviceservice=neworg.apache.axis.client.Service();//建立请求服务框架实例。/**org.apache.axis.client.Service实现JAX-RPCsjavax.xml.rpc.Services接口*该接口充当产生下面提到的org.apache.axis.client.Call实例的角色。*/org.apache.axis.client.Callcall;call=(org.apache.axis.client.Call)service.createCall();call.setTargetEndpointAddress(newjava.net.URL(endpoint));call.setOperationName(newjavax.xml.namespace.QName("http://169.169.19.128:8070/axis/services/ShipArrive","getArriveTime"));//设置需要调用的函数名称/**org.apache.axis.client.Call实现了JAX-RPCsjavax.xml.rpc.Call接口。*/QNamebpNmae=newQName("http://169.169.19.128:8070/axis/services/ShipArrive","ShipArriveTime");call.registerTypeMapping(ShipArriveTime.class,bpNmae,newBeanSerializerFactory(ShipArriveTime.class,bpNmae),newBeanDeserializerFactory(ShipArriveTime.class,bpNmae));call.setUseSOAPAction(true);call.setSOAPActionURI("http://169.169.19.128:8070/axis/services/ShipArrive");call.addParameter("getArriveTimeRequest",XMLType.XSD_STRING,ParameterMode.IN);call.setReturnType(newQName("http://169.169.19.128:8070/axis/services/ShipArrive"),ShipArriveTime[].class);result=(ShipArriveTime[])call.invoke(newObject[]{devicenums});}catch(Exceptione){//TODO自动生成catch块e.printStackTrace();}//从框架中生成一个维护调用的实例。returnresult;}}报错2010-4-2116:20:31org.apache.axis.client.CallSEVERE:Exception:2010-4-2116:20:31org.apache.axis.client.CallSEVERE:MSG_EXCEPTION_LOGGEDAxisFaultfaultCode:{http://xml.apache.org/axis/}Server.userExceptionfaultString:org.xml.sax.SAXException:Nodeserializerdefinedforarraytype{urn:AnalyzeShipArriveTime}ShipArriveTimefaultActor:nullfaultDetail:stackTrace:org.xml.sax.SAXException:Nodeserializerdefinedforarraytype{urn:AnalyzeShipArriveTime}ShipArriveTimeatorg.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDeserializer.java:257)atorg.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:394)atorg.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:906)atorg.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)atorg.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)atorg.apache.axis.message.RPCElement.deserialize(RPCElement.java:241)atorg.apache.axis.message.RPCElement.getParams(RPCElement.java:265)atorg.apache.axis.client.Call.invoke(Call.java:1871)atorg.apache.axis.client.Call.invoke(Call.java:1777)atorg.apache.axis.client.Call.invoke(Call.java:1315)ata_test.AISTimeService.getAISMessage_New(AISTimeService.java:74)ata_test.AISTimeService.main(AISTimeService.java:26)org.xml.sax.SAXException:Nodeserializerdefinedforarraytype{urn:AnalyzeShipArriveTime}ShipArriveTimeatorg.apache.axis.AxisFault.makeFault(AxisFault.java:120)atorg.apache.axis.client.Call.invoke(Call.java:1874)atorg.apache.axis.client.Call.invoke(Call.java:1777)atorg.apache.axis.client.Call.invoke(Call.java:1315)ata_test.AISTimeService.getAISMessage_New(AISTimeService.java:74)ata_test.AISTimeService.main(AISTimeService.java:26)Causedby:org.xml.sax.SAXException:Nodeserializerdefinedforarraytype{urn:AnalyzeShipArriveTime}ShipArriveTimeatorg.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDeserializer.java:257)atorg.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:394)atorg.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:906)atorg.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)atorg.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)atorg.apache.axis.message.RPCElement.deserialize(RPCElement.java:241)atorg.apache.axis.message.RPCElement.getParams(RPCElement.java:265)atorg.apache.axis.client.Call.invoke(Call.java:1871)...4moreExceptioninthread"main"java.lang.NullPointerExceptionata_test.AISTimeService.main(AISTimeService.java:28)这句话应该有问题,传入的是String类型,不知道怎么改call.addParameter("getArriveTimeRequest",XMLType.XSD_STRING,ParameterMode.IN);

时间: 2024-09-27 01:31:57

大侠帮忙看webservice调用存在什么问题的相关文章

JSP出现的问题,各位大侠帮忙看下是什么原因,该如何解决!

问题描述 错误提示拜求解决方法! 解决方案 解决方案二:图片看不到解决方案三:看不到图啊.解决方案四:kanbudaotu解决方案五:typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequest.exceptionorg.apache.jasper.JasperExceptionorg.apache.jasper.servlet.

c++11-请帮忙看下async_accept的这种调用方法,没有使用Bind,看不懂...

问题描述 请帮忙看下async_accept的这种调用方法,没有使用Bind,看不懂... void AsyncAcceptManaged(ManagerAcceptHandler mgrHandler) { _acceptor.async_accept(_socket, [this, mgrHandler](boost::system::error_code error) { if (!error) { try { _socket.non_blocking(true); mgrHandler(

c语言-求帮忙看下为什么程序调用了西沟函数导致程序整个不能运行

问题描述 求帮忙看下为什么程序调用了西沟函数导致程序整个不能运行 写说明一下代码,代码主要是要在控制台模拟浏览器对tab和网页前进后退的一些操作 再说明一下问题,问题在于brwosertab类和webinformation类的西沟函数,一旦在这两个类的西沟函数里面写上delete 指针名字:整个程序就不能运行了,最关键的是我不太明白为什么程序要调用这两个函数,因为我感觉我都是动态对象啊.最后说明一下,我很菜,只有一点java编程的经验,所以第一次应对c++我真的需要一些帮助.谢谢你们了! 解决方

javase-请大神帮忙看下,为什么MyPanel中的Paint方法没有被调用

问题描述 请大神帮忙看下,为什么MyPanel中的Paint方法没有被调用 package javademo; import javax.swing.*; import java.awt.*; public class DrawDemo extends JFrame{ MyPanel mp = null; public static void main(String []args){ DrawDemo drawdemo = new DrawDemo(); } public DrawDemo(){

C++的dll函数在c#中调用获取不到值,请大家帮忙看下,谢谢!

问题描述 下面的方法是c++写的DLL封装的方法,我要在c#里面引用然后使用:intSTDCALLSDT_ReadBaseMsg(intiPortID,unsignedchar*pucCHMsg,unsignedint*puiCHMsgLen,unsignedchar*pucPHMsg,unsignedint*puiPHMsgLen,intiIfOpen); 我在c#里面是这样写的:///<summary>///读取卡的信息///</summary>///<paramname

c语言-C语言题程序第二个输出结果是124还是125呢?求大侠帮忙解释

问题描述 C语言题程序第二个输出结果是124还是125呢?求大侠帮忙解释 #includeint change(int *data){ return (*data)++;}main(){ int data=123; change(&data); printf(""%ddata); data=change(&data); printf(""%d""data); printf(""n"");}V

vc6 0 extern 问题2个-vc6.0 中extern使用时遇到的2个疑问,还望诸位帮忙看下,多谢

问题描述 vc6.0 中extern使用时遇到的2个疑问,还望诸位帮忙看下,多谢 我在文件1CTestHello.cpp 声明了 extern void delete_string(char a[],char b[],char standard); 再调用文件2 file2.c中的delete_string(a,b,Standard);函数: 发现2个问题: 问题1:用extern实验发现必须用include,但查找资料,没有说这两个有必然关联.请问到底有没有必然关联?下面是实验: 如果文件1中

代码-java 难题 求大侠帮忙。小弟谢过了

问题描述 java 难题 求大侠帮忙.小弟谢过了 求大虾帮帮忙. 由于我底子薄,最好能用java 代码帮我解决下. 各组 ,每组有不同月份的业绩. 一共两个for循环, for (i = 0; i<=组 ; i++) { for(j = 0 ;j< = 月份; j++) { 这里是循环到月份 的业绩.取得到当月业绩. } } 例如:一共四个组,四个月份.按月份划分, 我要算出每个月的所有组业绩之和. 一组:一月 100 .二月200 .三月300. 四月.400 二组:100 200 300

c语言-C语言将两个递增有序单链表归并为一个降序的单链表,求大侠帮忙看看

问题描述 C语言将两个递增有序单链表归并为一个降序的单链表,求大侠帮忙看看 #include #include #define N 8 typedef struct list { char c; struct list *next; } SLIST; SLIST *creat(char *a) { SLIST *h,*p,*q; int i; h=p=(SLIST *)malloc(sizeof(SLIST)); for(i=0; i { q=(SLIST *)malloc(sizeof(SLI