Hey, thanks a lot for taking the time to offer this.
Now for some follow up questions. In Universe, a basic example of my subroutine would look likeb& B subroutine pricing(cust,items,qtys,prices) B7 B B B B B B B B pass in cust,items, and qtys B7 B B B B B B B B return prices associated to each item B B item.max = dcount(items,@am) B B for item.ptr = 1 to item.max B B B B B B prices <item.ptr> = 12345 B B next item.ptr return B B What I'm supposed to be offering up as input is B something like (trimmed down to save space)... B <GETPRICEQUOTEInput> B <QUOTES> B B B <CUSTOMERID>31997</CUSTOMERID> B </QUOTES> B <QUOTEITEMS> B B B <QUOTEITEM> B B B B B <ITEMID>5017</ITEMID> B B B B B <QTY>2</QTY> B B B </QUOTEITEM> B </QUOTEITEMS> </GETPRICEQUOTEInput> B The closest I could get with the u2wsd was... B <GETPRICEQUOTEInput> B B B <CUSTOMERID>31997</CUSTOMERID> B <QUOTEITEMS> B B B B B <ITEMID>5017</ITEMID> B B B B B <QTY>2</QTY> B </QUOTEITEMS> </GETPRICEQUOTEInput> B What I need to return is basically the same thing as the xml passed in but with an additional element named <PRICE>. You wouldn't happen to have an example of how to parse the xml data into arrays for arguments to the uv sub would you? As long as I'm asking for that...B What about an example of how to create the xml from the uv arrays?B And heck, as long as I'm getting bold... How would I generateB the wsdl so the client knows what I'm offering? Although I do have visual studio 2008, I haven't done anything with it yet.B B I was hoping to start learning it, but at my own pace. Now I'm under the gun! B B Sorry for such basic questions and thanks a ton B for the guidance. I remember writing the backend for a website on our Universe system back in 2000.B I was creating xml and pushing it out to Microsoft Message Queue service using a GCI routine someone wrote for usB in C.B It was so easy to build the XML and pass it back.B This stuff seems pretty complicated. Here's another question.B I have a thermos.B I can put hot stuff in it, it keeps it hot.B I can put cold stuff in it, it keeps it cold.B How do it know? B ----- Original Message ----- From: "Symeon Breen" <[email protected]> To: [email protected] Sent: Thursday, March 12, 2009 3:34:10 PM GMT -06:00 US/Canada Central Subject: RE: [U2] Web Services It is very easy to write an asp.net web service that connects to unidata using uniobjects.net - hey i have even included some code below for you to look at Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols Imports IBMU2.UODOTNET ' Example web service by Symeon Breen, a2c limited, Lancashire, UK ' Please change the namespace if it is to be used or copied. <WebService(Description:="example web service using uniobjects.net", name:="WebService", Namespace:="http://tempuri.org/")> _ <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ Public Class WebService B B B Inherits System.Web.Services.WebService B B B <WebMethod(Description:="Example method")> _ B B B Public Function example1(ByVal host As String, ByVal account As String, ByVal connection As String, ByVal login As String, ByVal password As String, ByVal param As String) As String B B B B B ' example 1 takes in parameters of :- B B B B B ' host - u2 host ip or name B B B B B ' account - account path or name B B B B B ' connection - connection type e.g udcs for unidata B B B B B ' login - username to login as B B B B B ' password - password for username B B B B B ' These parameters are passed in as an example, for security you may wish to hard code or parameterise these at the webserver in the web.config as connection strings. Then the data passed into the webservice would be for its function not connection. B B B B B ' This webservice will connect to u2 on host and account and run the databasic program WSexample passing in param. WSexample will pass back some text that this web service then passes back to the client as a string. Ideally a class should be defined with public properties exposed as XML and this method would return the class hence a full xml doc can be produced. B B B B B ' NB bin directory should contain the uniobjects.net dll (UODOTNET.dll) B B B B B Dim u2Session As UniSession = Nothing B B B B B Dim rtnMessage As String = String.Empty B B B B B Dim u2Sub As UniSubroutine B B B B B UniObjects.UOPooling = True B B B B B UniObjects.MaxPoolSize = 2 B B B B B UniObjects.MinPoolSize = 1 B B B B B Try B B B B B B B u2Session = UniObjects.OpenSession(host, login, password, account, connection) B B B B B B B Try B B B B B B B B B u2Sub = u2Session.CreateUniSubroutine("WSexample", 2) B B B B B B B B B u2Sub.SetArg(0, param) B B B B B B B B B u2Sub.Call() B B B B B B B B B rtnMessage = u2Sub.GetArg(1) B B B B B B B Catch ex As Exception B B B B B B B B B rtnMessage = "ERROR - In call to sub - " & ex.ToString B B B B B B B Finally B B B B B B B B B u2Sub = Nothing B B B B B B B B B UniObjects.CloseSession(u2Session) B B B B B B B End Try B B B B B Catch ex As Exception B B B B B B B rtnMessage = "ERROR - " & ex.ToString B B B B B Finally B B B B B B B u2Session = Nothing B B B B B End Try B B B B B Return rtnMessage B B B End Function End Class Easy ?? B I thinks so .... -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: 12 March 2009 19:32 To: u2-Users Subject: [U2] Web Services Hi all, UV10.2.7 HPUX 11.23 Does anyone know if it is possible to use IBM WebSphere Development Studio Client Tool to develop web services for Universe?B B I've been trying to use the Web Services Developer but cannot seem to create all of the necessary nesting levels required by the client application .B B I am now searching for alternatives. Thanks much for any info you can provide, Scott Thompson ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
