The XML Definition of "Sequence" is an ordered list of attributes so the field order is required to be in the exact same order as they are defined. Fred
________________________________ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Robert Halstead Sent: Thursday, June 26, 2008 5:18 PM To: [email protected] Subject: Re: 6.3 Web Service Input Mapping Order ** More information on this. If the order of the fields matches the order of the input mapping when sending a Create or Set method, we do not get the error at all. It's only when the order differs. On Thu, Jun 26, 2008 at 10:16 AM, Robert Halstead <[EMAIL PROTECTED]> wrote: System: ARS 6.3 Patch 20 Midtier w/ Java 1.4.2_13 Hey all, We're using web services to connect with our Remedy server and we're noticing that when sending an opSet XML method to Remedy, the fields need to be in the same order as the Input Mapping is defined for that function. Is there any way around this, or is this the correct functionality? It would seem to me that by using XML, the field order shouldn't matter. There is a chance that I have my input mappings messed up. Here's an example: Here is the XML being sent to the server: <?xml version="1.0" encoding="windows-1252"?> <operation name="OpSet" type="set" qualification="'Incident ID' = XPATH(/ROOT/Incident_ID)"> <arOptions> <setOptions> <type>setAll</type> <documentType>full</documentType> </setOptions> </arOptions> <inputMapping name="InputMapping" topLevelElement="OpSet"/> <outputMapping name="OutputMapping" topLevelElement="OpSetResponse"/> </operation> <?xml version="1.0" encoding="UTF-8"?> <ROOT> <Incident_ID>INC000000001010</Incident_ID> <Details>Test see if new lines work They should since it is sometimes helpful to have multiple lines in a Detailed Description</Details> <Priority>High</Priority> <Severity>Minor</Severity> </ROOT> My Input Mapping for the form BZ:Incident is the following (all fields have a minOccurs = 0): <xsd:element name="OpSet" type="s:InputMapping"/> <xsd:complexType name="InputMapping"> <xsd:sequence> <xsd:element name="Incident_ID" type="xsd:string"/> <xsd:element minOccurs="0" name="Status" nillable="true" type="xsd:string"/> <xsd:element minOccurs="0" name="Severity" nillable="true" type="xsd:string"/> <xsd:element minOccurs="0" name="Description" nillable="true" type="xsd:string"/> <xsd:element minOccurs="0" name="Market" nillable="true" type="xsd:string"/> <xsd:element minOccurs="0" name="City" nillable="true" type="xsd:string"/> <xsd:element minOccurs="0" name="Headend" nillable="true" type="xsd:string"/> <xsd:element minOccurs="0" name="CMTS" nillable="true" type="xsd:string"/> <xsd:element minOccurs="0" name="Priority" nillable="true" type="s:PriorityType"/> <xsd:element minOccurs="0" name="Details" nillable="true" type="xsd:string"/> <xsd:element minOccurs="0" name="Work_Log" nillable="true" type="xsd:string"/> </xsd:sequence> </xsd:complexType> For this example we get an Error of 8962: SEVERE: AxisFault : MessageType: 2 MessageNum: 8962 MessageText: Unexpected element encountered in the input XML document AppendedText: <Priority> at com.remedy.arsys.api.Proxy.ARXMLSetEntry(Native Method) at com.remedy.arsys.api.Util.ARXMLSetEntry(Util.java:2741) at com.remedy.arsys.ws.services.ARService.performOperation(Unknown Source) at com.remedy.arsys.ws.services.ARService.processRequest(Unknown Source) at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.ja va:162) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333 ) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j ava:71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j ava:339) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon textValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 20) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79 9) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57 7) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:683) at java.lang.Thread.run(Thread.java:534) We don't get the error if we switch the order of the fields in the XML so that Priority is below details. Is there a way to make it so that the order doesn't matter? -- "A fool acts, regardless; knowing well that he is wrong. The ignoramus acts on only what he knows, but all that he knows. The ignoramus may be saved, but the fool knows that he is doomed." Robert Halstead -- "A fool acts, regardless; knowing well that he is wrong. The ignoramus acts on only what he knows, but all that he knows. The ignoramus may be saved, but the fool knows that he is doomed." Robert Halstead __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" html___ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

