Set web service url - weblogic.developer.interest.webservices.general(Archived)

Hi!
I generated web service client using clientgen tool. This client is searching for webservice listening on url specified in wsdl. Is there any chance to change the target endpoint address like setting some property so there would be no need to generate client (with wsdl with new address) again?
This is how i prepare call parameters:
SfOXPReports_Impl service= new fOXPReports_Impl();
SfOXPReportsSoap client= service.getSfOXPReportsSoap();
// web service call
SCReportMerge mergeResult= SCReportMergeDocument.Factory.parse(client.merge(mergeParam.xmlText())).getSCReportMerge();
Any suggestion?
--
Edited by DJmanta at 04/11/2008 3:52 AM
--
Edited by DJmanta at 04/11/2008 3:54 AM
--
Edited by DJmanta at 04/11/2008 3:54 AM 

You can set the property:
stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, your_url);

Related

XML as string via OSB, how to send ?

I want to send an XML as a string to a Producer's WebService via OSB, for example:
<osb:sendStringXML xmlns:osb="http://temp.openuri.org/OSB_String_param_as_XML.xsd">
<osb:strXML>
*<myxml>*
*<str name="test">123</str>*
*</myxml>*
</osb:strXML>
</osb:sendStringXML>
The Producer needs:
*+<myxml>+*
*+<str name="test">123</str>+*
*+</myxml>+*
but not:
+123+
I tried [!CData[  ... ]] - doesn't work !
I tried to add the Replace action in the OSB rooting and thru XQuery/XSLT Expression Editor:
fn:replace($myXML,  < ,  &lt ) - but it doesn't replace anything.
Any suggestions ?
Thanks a lot !
Edited by: George Moykin on 2009-4-27 13:32
Edited by: George Moykin on 2009-4-27 13:32
Edited by: George Moykin on 2009-4-27 13:33
Edited by: George Moykin on 2009-4-27 13:33 
Sorry I don't have my environment handy, so I'm speaking from memory here, but have you set the output as a type of string? I mean for the whole payload, not just the element.
it means you need to do a bit of hard coding
here is some sudo if what I'm trying to say
concat('<osb:sendStringXML xmlns:osb="http://temp.openuri.org/OSB_String_param_as_XML.xsd">
<osb:strXML>
<myxml>
<str name="test">', data
, '</str>
</myxml>')
cheers
James 
Can you see if fn-bea:serialize() is of any help.
Assign [$body] to [bodyOriginal] (This is optional step)
Replace [node contents] of [.] in [body] with $body//myxml
Noe your $body is populated with
<myxml>
<str name="test">123</str>
</myxml>
Does it help?
Edited by: mneelapu on Apr 27, 2009 4:56 PM 
Hi,
can you provide the Configuration Details of the OSB. your configuration might repalce the tags.
regards,
Joy 
Yes, I tried with fn-bea:serialize($arg-items) but the function adds the namespaces within the nodes, for example:
The XML is:
*<osb:strXML>*
*<sample name="test">123</sample>*
*</osb:strXML>*
and the Producer receives:
*<osb:strXML xmlns:osb="http://temp.openuri.org/OSB_String_param_as_XML.xsd">*
*<sample name="test" xmlns:osb="http://temp.openuri.org/OSB_String_param_as_XML.xsd">123</sample>*
*</osb:strXML>*
thus I'll need to remove the +"xmlns ..."+, the Producer's parser doesn't expect tnem.
Imagine it has a hundred of nodes... 
Hi Joy,
What do you mean Configuration Details of the OSB ?
The structure of the project (Business & Proxy services), Stage Configuration (routing, actions etc. ), OSB version, Produser's WSDL, XSD etc. ?
What do you need me to send you or to apply here?
Thanks 
George Moykin wrote:
Yes, I tried with fn-bea:serialize($arg-items) but the function adds the namespaces within the nodes, for example:
The XML is:
*<osb:strXML>*
*<sample name="test">123</sample>*
*</osb:strXML>*
and the Producer receives:
*<osb:strXML xmlns:osb="http://temp.openuri.org/OSB_String_param_as_XML.xsd">*
*<sample name="test" xmlns:osb="http://temp.openuri.org/OSB_String_param_as_XML.xsd">123</sample>*
*</osb:strXML>*
thus I'll need to remove the +"xmlns ..."+, the Producer's parser doesn't expect tnem.
Imagine it has a hundred of nodes...I tried and its working in my local box. I'm not an xpath guru. It might not be an optimized solution, but a working solution
Assign $body to originalBody
Replace node contents of . in body with $body//myxml
Replace node contents of . in body with fn:replace(fn-bea:serialize($body), "xmlns:osb="http://temp.openuri.org/OSB_String_param_as_XML.xsd"", "")
Please escape the " in the second parameter for replace.
Test Input Data:
<osb:sendStringXML      xmlns:osb="http://temp.openuri.org/OSB_String_param_as_XML.xsd">
     <osb:strXML>
     <myxml>
     <str      name="test">123</str>
     </myxml>
     </osb:strXML>
     </osb:sendStringXML>
Output
<soap-env:Body      xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
     <myxml>
     <str      name="test">123</str>
     </myxml>
     </soap-env:Body>
Edited by: mneelapu on Apr 27, 2009 6:25 PM
Edited by: mneelapu on Apr 27, 2009 6:26 PM
Edited by: mneelapu on Apr 27, 2009 6:27 PM
Edited by: mneelapu on Apr 27, 2009 6:29 PM
Edited by: mneelapu on Apr 27, 2009 6:31 PM
Edited by: mneelapu on Apr 27, 2009 6:33 PM 
Hi,
just open the proxy/business service and copy the details from browser and paste. it will look like:
General Configuration
Service Type Web Service - SOAP 1.1
Transport Configuration
Protocol http
Endpoint URI
Get All Headers No
Headers
HTTP Transport Configuration
........
Just copy and paste and if you have any transform then give the details.
regards,
Joy 
Hi Joy,
Here is the config.:
Business Service
General Configuration      
Service Type      Web Service - SOAP 1.1 (WSDL: Test_XMLString_SOAP/WSDL/OSB_XML_String_wsdl, port="OSB_String_param_as_XML_WSSoap")
Transport Configuration      
Protocol      http
Load Balancing Algorithm      none
Endpoint URI      
http://myHost:myPort/myService
Retry Count      0
Retry Iteration Interval      30
Retry Application Errors      Yes
HTTP Transport Configuration      
Timeout      0
HTTP Request Method      POST
Authentication      None
Proxy Server      
Follow HTTP redirects      DISABLED
Use Chunked Streaming Mode      ENABLED
SOAP Binding Configuration      
Enforce WS-I Compliance      No
Message Content Handling Configuration      
XOP/MTOM Support      Disabled
Page Attachments to Disk      No
ProxyService
General Configuration      
Service Type      Any XML Service
Transport Configuration      
Protocol      http
Endpoint URI      /anyXML_PS
Get All Headers      No
Headers      
HTTP Transport Configuration      
HTTPS required      No
Authentication      None
Message Content Handling Configuration      
Content Streaming      Disabled
XOP/MTOM Support      Disabled
Page Attachments to Disk      No
The OSB version is 10.3
I use the Stage Configuration: Route Node to the Business Service
;) 
Hi George,
just create a new business service of type "Any XML" and attach the endpoint URI with it. I think it will work.
regards,
Joy 
I have my xquery example. $getRequest/Element is the variable that holds the 123.
(:: pragma bea:global-element-parameter parameter="$getRequest" element="ns0:GetRequest" location="../WSDL/Get.wsdl" ::)
declare namespace xf = "http://tempuri.org/Request_SB/GetRequest_To_String/";
declare namespace ns0 = "http://www.oracle.com/Get/";
declare function xf:GetRequest_To_String($getRequest as element(ns0:GetRequest))
as xs:string {
concat( '<osb:strXML>'
, '<sample name="test">', $getRequest/Element, '</sample>'
, '</osb:strXML>'
)
};
declare variable $getRequest as element(ns0:GetRequest) external;
xf:GetRequest_To_String($getRequest)
cheers
James 
Thank you very much Mneelapu ! 
Thank you JTaylor ! 
I tried with fn-bea:serialize($arg-items) ,but the output message of this query is "123".
Can somebody help why it is giving just the data of the xml not complete xml structure?
Thanks, 
got the solution of my last query.
the function fn-bea:serialize() doesnt work in Report action in OSB directly.Just put it inside some tags like:
<report>{fn-bea:serialize($arg-items)}</report>
It will work.
Nidhi

Web service - Missing port information

Hello Again.... can someone help me,
I use jdk-1.6
I created a Web Service Client JAX-RPC usind a wsdl file
My main example:
Express_Impl service = new Express_Impl();
ExpressP port = service.getExpressPort();
System.out.println("res: " + port.getVersion());
...and now i got this exception:
java.rmi.ServerException: JAXRPCSERVLET28: Missing port information
Can someone help me please, thanks all.
Edited by: user8260312 on May 28, 2009 12:12 PM
Edited by: user8260312 on May 28, 2009 12:13 PM 
i tried to make perl client and ge the same error...

deploy Tuexdo service at Weblogic

I config a proxy service at OSB using Tuxedo Transport. When tuxedo client call tpinit() , it failed and I got an error message "No BBL". Did anything I miss?
Edited by: user10669569 on Nov 4, 2009 1:41 AM

JWS webservice java:  name space in xml messages

I have a web service via JWS file (details bellow)
With custom java classes as input and out put params of a web method
It's compiled and working well, but
The system is adding "java:" prefix too all outbound messages and require the same prefix/namespace for all incoming messages for embedded xml tags
Like here:
Request
<sch:requestXml>
<java:MyService>
<java:MyHeader>
<java:RequestActivityName>?</java:RequestActivityName>
<java:MsgName>?</java:MsgName>
<java:MsgType>?</java:MsgType>
</java:MyHeader>
<java:MyBody>
........
Response
<java:PolicyException xmlns:java="java:com.mycompany.service">
<java:MessageId/>
<java:ErrorCode>0001</java:ErrorCode>
How can I remove java namespace ?
To have the same xml but without java namespace. (not to replace by another name space just do not have namespace)
JWS Details:
#WebService(name = "SomeSoapService", targetNamespace = "http://www.company.com/schemas")
#SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL)
And web method
#WebMethod(action = "", operationName = "someService")
#WebResult(name = "MyService")
#weblogic.jws.soap.SOAPBinding(style= javax.jws.soap.SOAPBinding.Style.DOCUMENT,
use=javax.jws.soap.SOAPBinding.Use.LITERAL,
parameterStyle= javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED)
public MyService equipmentService(
#WebParam(name = "requestXml") RequestXml requestXml)
throws PolicyException, SystemException;
Will really appreciate your help!
Thanks!
Edited by: endorthin on Apr 1, 2010 9:16 PM
Edited by: endorthin on Apr 1, 2010 9:28 PM
Edited by: endorthin on Apr 1, 2010 9:33 PM
Edited by: endorthin on Apr 2, 2010 4:02 PM 
I have more details on this
So the problem is that weblogic is applying namespace specified only to webparam itself, all nested structure has different java namespace
Only if you have nested java objects the name space for all children will be different to webparam and it wil be "java" point to package the classes are stored
For example, according to generated schema here the request should be the following
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://www.company.com/schemas" xmlns:java="java:com.mytest.integration.service.xsd">
<soapenv:Header/>
<soapenv:Body>
<sch:requestXml>
<*java*:MyService>
<*java*:MyHeader>
...
Is it possible to use one namespace or remove default "java" namespace?

Urgent: get http settings portlet url for a portlet

I need to get the portlet url that we enter for a webservice in Main settings -HTTP settings for a web service through code. I have the web service object id. Is this possible ?
Edited by: Manjeera on May 23, 2010 10:03 PM
Edited by: Manjeera on May 23, 2010 10:03 PM 
If you are considering to retrieve this url via remote api I'm afraid that is not possible. If you are using server api it's possible, you will find this data under this property: PTC_HTTPGADGET_URL 
Can you please provide me code to do this 
consider this code:
IPTWebService ptWebService = (IPTWebService) ((IPTSession) m_asOwner.GetUserSession()).GetWebServices().Open(nWebServiceID, false);
String strUrl = ptWebService.GetAbsoluteURL(PlumtreeExtensibility.PT_PROPBAG_HTTPGADGET_URL);
strUrl contain complete url (remote server + gadget url)
I hope this will help you.
Marcin

Categories

Resources