I currently have a SOAP Server Object Extension that is returning a string. The string is a pair of comma delimited coordinates, but what I really want to get back is an array of integers.
What I have is something like this (with business logic removed)
private string OffsetCoords(string StrName, int sp_x, int sp_y, string offsetDir, double offset)
{
return string
}
What I would like it to do is something like this
private int[] OffsetCoords(string StrName, int sp_x, int sp_y, string offsetDir, double offset)
{
return int[]
}
Writing the business logic is not a problem, but what I am not clear on is what to return from my method. Does an integer array work in this case or is their a better type to use?
Also, I am not clear on how to format the WSDL and the Imessage parameters to accept the data type returned by the method. I have the WSDL configured to return a string with the following code:
<xs:element name="OffsetCoordsResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="NewXY" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
And my code containing the Imessage is below where respMsg implements Imessage.
string newCoords = OffsetCoords(StrName, sp_x, sp_y, offsetDir, offset);
//fill response
respMsg.Name = "OffsetCoordsResponse";
respMsg.NamespaceURI = c_ns_soe;
respMsg.Parameters.AddString("NewXY", newCoords);
Do I use AddObject to the Imessage.Parameters method and if so can you provide some structure?
Thanks,
Mele