*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(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.java:162)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java: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.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
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:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
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
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"