RMI-SOAP conversion
Dear techies,
I have an existing RMI Server which I would like to convert to Web Service .
and I found hurdles all the way. Any help in this regard will be much appreciated.
I used JAX-RPC and also tried GLUE from www.themindelectric.com
1) RMI allows me to transport data as well as behaviour , SOAP doesnt.
I have a lot of user defined types for which I have to write Serializers/
Deserializers. To avoid that I have written Java Bean wrappers over
all User Defined types.Am wondering if this will interoperate with
Apache AXIS and other implementations?
By Default JAX-RPC uses 'SOAP section 5 encoding style' can
I plug in some other encoding style such as OMGs XMI ( I dont have
the need , jus curious)
2) Some of the functions that I want to expose as a web service accepts
interfaces. Am stuck on this. I see that XML Schema defines a construct
called abstract in section 4.7 . and I tried a tool named GLUE which
generated WSDL files automatically for my functions that accepts interfaces
and it declared those types as abstract=true . But am not clear on that c
can some one shed some light please. The BIG question is *How Do I expose
a function that accepts interfaces as arguments as a web Service? *
3) My RMI Server allows Notifications to be sent to the client.(sort of
call back). Dunno how to do the same using JAX-RPC?
Or rather can I use JAX-RPC to implements call backs. Or should I use
JAXM to do that? ( I havent used JAXM..dont even know that its used for such
purpose).
Section 2.4.4 of WSDL Specification talks about Notification Operation
How can I realise that thru java ? Or Rather how would I declare My function
such that xrpcc (or that matter any other tool) generates WSDL with a
notification operation .
( Perhaps I can use Multipart MIME to push notifications to the client,
but dunno how to implement them )
The Scenario is as follows
- RMI Client calls a AmInterestedInReceivingUpdates(ClientRef ) function of the server
- The Server Stores the Clients (RemoteReference) in a data structure
- Whenever an update occurs at the server side the server uses the RemoteReference to
invoke the handleUpdate() function of the client
How do I do this using SOAP/JAX-RPC or AXIS or any other?
Thanks and Regards
Sudeep Chandran
The Lesson that I have learnt is if the same species in different planets
communicate they can exchange both data and behaviour . If Different species in
different planets communicate they can exchange only data .
Hi Kevin,
How did WASP help solve your problem?
Am interested in knowing how you have defined the interface in WSDL file.
-Tnx
Sudeep
I guess that answers my question. That is, you can't
get around this problem with JWSDP EA2.
Thanks for the info on GLUE, I am looking into it.
BTW, I have been successful using WASP from Systinet
to make a Jini service available as a Web Service
also.
Thanks,
Kevin Carroll
Similar Messages
-
Hi,
I want to consume a WSDL file and convert it into XML or SOAP message without using any tool, but with any code or API usage. Kindly give the solution if you have any?
Thanks a ton!Uh...
1) WSDL files are XML files
2) WSDL files are interface definitions. SOAP is a protocol for requests and responses against such interfaces. Different things, no conversion. -
Use of soap conversion parameters
Hi experts,
please explain fallowing soap sender side parameters..
what is the use of each parameter
Thanks and Regards,
E. Ravi Chandra ReddyHi,
please check below.
If the adapter is to expect a message without a SOAP envelope, select Use No SOAP Envelope . In addition specify nosoap=true in the URL.
The adapter puts the whole message in the XI payload.
To include the header of the Web service message in the XI message, select Keep Headers .
To include attachments of the Web service message in the XI message, select Keep Attachments .
If the XI header information is to be included in the encoded string, select Use Encoded Headers .
If the XI header information is to be included in a query string, select Use Query String .
refer the below link for CC configuration for more details
http://help.sap.com/saphelp_nw73/helpdata/en/48/3555240bea31c3e10000000a42189d/frameset.htm
Regards -
RMI exception calling web service from proxy class
I am getting the following error attempting to call a web service from a proxy. It appears to relate to the type of objects I am trying to send vs the type that is expected. Following the exception I am adding a copy of the control where calling the web service is sucessful, a copy of the proxy class that I am using to make this unsucessful call, and the controller.jpf that has the formBean where I am creating my objects
Caught Exception Calling the Web Service from the Proxy. The Exception is the f
ollowing: java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SO
APException: failed to serialize class org.openuri.www.CreateAccountCheckingReq
uestweblogic.xml.schema.binding.SerializationException: type mapping lookup fail
ure on class=class controls.CheckingService$anyType TypeMapping=TYPEMAPPING SIZE
=5
ENTRY 1:
class: org.openuri.www.CreateAccountCheckingResponse
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
ENTRY 2:
class: org.openuri.www.FundingInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
ENTRY 3:
class: org.openuri.www.AccountInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
ENTRY 4:
class: org.openuri.www.CustomerInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
ENTRY 5:
class: org.openuri.www.CreateAccountCheckingRequest
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
; nested exception is:
javax.xml.soap.SOAPException: failed to serialize class org.openuri.www
.CreateAccountCheckingRequestweblogic.xml.schema.binding.SerializationException:
type mapping lookup failure on class=class controls.CheckingService$anyType Typ
eMapping=TYPEMAPPING SIZE=5
ENTRY 1:
class: org.openuri.www.CreateAccountCheckingResponse
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
ENTRY 2:
class: org.openuri.www.FundingInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
ENTRY 3:
class: org.openuri.www.AccountInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
ENTRY 4:
class: org.openuri.www.CustomerInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
ENTRY 5:
class: org.openuri.www.CreateAccountCheckingRequest
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
Java Control for the web service:
package controls;
import weblogic.webservice.context.WebServiceContext;
* @jc:location http-url="http://localhost:7001/Checking.jws"
* @jc:wsdl file="#CheckingWsdl"
* @jc:handler callback="MessageHandler" operation="MessageHandler"
public interface CheckingService extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
public static class CustomerInfo
implements java.io.Serializable
public java.lang.String FirstName;
public java.lang.String LastName;
public java.lang.String MiddleName;
public int SSN;
public int CustomerNumber;
public java.util.Calendar CreationDate;
public java.util.Calendar LastModifiedDate;
public static class FundingInfo
implements java.io.Serializable
public float Amount;
public java.util.Calendar CurrentDate;
public int AccountNumber;
public static class anyType
implements java.io.Serializable
public com.bea.xml.XmlObject[] t;
public static class AccountInfo
implements java.io.Serializable
public int AccountNumber;
public float Balance;
public int CustomerNumber;
public java.util.Calendar LastModifiedDate;
public WebServiceContext context = CheckingService.context;
* @jc:protocol form-post="false" form-get="false"
public AccountInfo CreateAccountChecking (CustomerInfo CustomerInfo, FundingInfo FundingInfo, anyType CommonHeader);
static final long serialVersionUID = 1L;
/** @common:define name="CheckingWsdl" value::
<?xml version="1.0" encoding="utf-8"?>
<!-- @editor-info:link autogen="false" source="" -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
<types>
<s:schema targetNamespace="http://www.openuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema">
<s:element name="CreateAccountCheckingRequest">
<s:complexType>
<s:sequence>
<s:element name="CustomerInfo">
<s:complexType>
<s:sequence>
<s:element name="FirstName" type="s:string" nillable="false"/>
<s:element name="LastName" type="s:string" nillable="false"/>
<s:element name="MiddleName" type="s:string" nillable="true"/>
<s:element name="SSN" type="s:int"/>
<s:element name="CustomerNumber" type="s:int"/>
<s:element name="CreationDate" type="s:dateTime"/>
<s:element name="LastModifiedDate" type="s:dateTime"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="FundingInfo">
<s:complexType>
<s:sequence>
<s:element name="Amount" type="s:float"/>
<s:element name="CurrentDate" type="s:dateTime"/>
<s:element name="AccountNumber" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CommonHeader" type="s:anyType"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CreateAccountCheckingResponse">
<s:complexType>
<s:sequence>
<s:element name="AccountInfo">
<s:complexType>
<s:sequence>
<s:element name="AccountNumber" type="s:int"/>
<s:element name="Balance" type="s:float"/>
<s:element name="CustomerNumber" type="s:int"/>
<s:element name="LastModifiedDate" type="s:dateTime"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string"/>
</s:schema>
</types>
<message name="CreateAccountCheckingSoapIn">
<part name="parameters" element="s0:CreateAccountCheckingRequest"/>
</message>
<message name="CreateAccountCheckingSoapOut">
<part name="parameters" element="s0:CreateAccountCheckingResponse"/>
</message>
<portType name="CheckingSoap">
<operation name="CreateAccountChecking">
<input message="s0:CreateAccountCheckingSoapIn"/>
<output message="s0:CreateAccountCheckingSoapOut"/>
</operation>
</portType>
<binding name="CheckingSoap" type="s0:CheckingSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="CreateAccountChecking">
<soap:operation soapAction="http://www.openuri.org/CreateAccountChecking" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="Checking">
<port name="CheckingSoap" binding="s0:CheckingSoap">
<soap:address location="http://localhost:7001/Checking.jws"/>
</port>
</service>
</definitions>
FOLLOWING IS THE PROXY CLASS THAT IS UNSUCCESSFUL
import controls.CheckingService.anyType;
import java.util.ArrayList;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
import org.openuri.CreateAccountCheckingResponseDocument.CreateAccountCheckingResponse;
import org.openuri.www.CustomerInfoAnonType;
import org.openuri.www.FundingInfoAnonType;
import weblogic.jws.proxies.*;
import weblogic.webservice.context.WebServiceContext;
import weblogic.webservice.context.WebServiceSession;
import weblogic.webservice.core.handler.WSSEClientHandler;
import weblogic.webservice.tools.pagegen.result;
import weblogic.xml.security.UserInfo;
import weblogic.xml.security.wsse.Security;
import weblogic.xml.security.wsse.SecurityElementFactory;
//import weblogic.jws.proxies.WebServiceB;
//import weblogic.jws.proxies.WebServiceB_Impl;
//import weblogic.jws.proxies.WebServiceBSoap;
public class CheckingWSProxy
public static void CallWS(Controller.CreateAccountCheckingForm form)
String user;
String pass;
try{
* Instantiate the main proxy class. The proxy class has the same name as the
* web service, with "_Impl" appended.
Checking myservice = new Checking_Impl("http://localhost:7001/ConsumerAccountApp/schemas/CheckingService.wsdl");
WebServiceContext context = myservice.context();
WebServiceSession session = context.getSession();
* Registers a handler for the SOAP message traffic.
HandlerRegistry registry = myservice.getHandlerRegistry();
List list = new ArrayList();
list.add(new HandlerInfo(WSSEClientHandler.class, null, null));
registry.setHandlerChain(new QName("Checking"), list);
* Set the username and password token for SOAP message sent from the client, through
* the proxy, to the web service.
user = form.getUsername();
pass = form.getPassword();
UserInfo ui = new UserInfo(user, pass);
session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
* Adds the username / password token to the SOAP header.
SecurityElementFactory factory = SecurityElementFactory.getDefaultFactory();
Security security = factory.createSecurity(null);
security.addToken(ui);
session.setAttribute(WSSEClientHandler.REQUEST_SECURITY, security);
* Get the protocol-specific proxy class.
CheckingSoap msg=myservice.getCheckingSoap();
* Invoke the web service method
msg.createAccountChecking((CustomerInfoAnonType)form.getProxyCustomerInfo(), (FundingInfoAnonType)form.getProxyFundingInfo(), (Object)form.get_CommonHeader());
catch (Exception ex)
System.out.println("Caught Exception Calling the Web Service from the Proxy. The Exception is the following: " + ex.toString());
FOLLOWING IS THE FORMBEAN IN THE CONTROLLER.JPF FILE
* FormData get and set methods may be overwritten by the Form Bean editor.
public static class CreateAccountCheckingForm extends FormData
private anyType _CommonHeader;
private controls.CheckingService.FundingInfo _FundingInfo;
private controls.CheckingService.CustomerInfo _CustomerInfo;
private java.util.Date dOut;
private java.util.Calendar cOut;
private CustomerInfo proxyCustomerInfo;
private FundingInfo proxyFundingInfo;
private String stringDate;
private String currentDate;
private String lastModifiedDate;
private String creationDate;
private String systemMessage;
private String username;
private String password;
private String accountType;
private String trashTransferAccount;
private String trashAccountNumber;
private boolean secureFlag;
public void set_CustomerInfo(controls.CheckingService.CustomerInfo _CustomerInfo)
_CustomerInfo.CreationDate = parseDate(getCreationDate());
_CustomerInfo.LastModifiedDate = parseDate(getLastModifiedDate());
this._CustomerInfo = _CustomerInfo;
public controls.CheckingService.CustomerInfo get_CustomerInfo()
if(this._CustomerInfo == null)
this._CustomerInfo = new controls.CheckingService.CustomerInfo();
_CustomerInfo.CreationDate = dateNow();
_CustomerInfo.LastModifiedDate = dateNow();
return this._CustomerInfo;
public CustomerInfo getProxyCustomerInfo()
this.proxyCustomerInfo = (CustomerInfo)this._CustomerInfo;
return this.proxyCustomerInfo;
public void set_FundingInfo(controls.CheckingService.FundingInfo _FundingInfo)
_FundingInfo.CurrentDate = parseDate(getCurrentDate());
this._FundingInfo = _FundingInfo;
public controls.CheckingService.FundingInfo get_FundingInfo()
if(this._FundingInfo == null)
this._FundingInfo = new controls.CheckingService.FundingInfo();
_FundingInfo.CurrentDate = dateNow();
return this._FundingInfo;
public FundingInfo getProxyFundingInfo()
this.proxyFundingInfo = (FundingInfo)this._FundingInfo;
return this.proxyFundingInfo;
public void set_CommonHeader(anyType _CommonHeader)
this._CommonHeader = _CommonHeader;
public anyType get_CommonHeader()
if(this._CommonHeader == null)
this._CommonHeader = new anyType();
return this._CommonHeader;
public java.util.Calendar dateNow()
this.dOut = new Date();
Calendar cOut = this.cOut.getInstance();
cOut.setTime(this.dOut);
this.cOut = cOut;
return this.cOut;
public java.util.Calendar parseDate( String strDate )
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
Calendar cOut = this.cOut;
df4.setLenient( false );
try
this.dOut = df4.parse( strDate );
} catch ( ParseException e )
cOut.getInstance();
cOut.setTime(dOut);
this.cOut = cOut;
return this.cOut;
public void setStringDate( String stringDate )
this.stringDate = stringDate;
public String getStringDate()
return this.stringDate;
public void setCurrentDate( String currentDate )
this.currentDate = currentDate;
public String getCurrentDate()
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
this.currentDate = df4.format(_FundingInfo.CurrentDate.getTime());
return this.currentDate;
public void setLastModifiedDate( String lastModifiedDate )
this.lastModifiedDate = lastModifiedDate;
public String getLastModifiedDate()
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
this.lastModifiedDate = df4.format(_CustomerInfo.LastModifiedDate.getTime());
return this.lastModifiedDate;
public void setCreationDate( String creationDate )
this.creationDate = creationDate;
public String getCreationDate()
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
this.creationDate = df4.format(_CustomerInfo.CreationDate.getTime());
return this.creationDate;
public void setUsername( String username )
this.username = username;
public String getUsername()
return this.username;
public void setPassword( String password )
this.password = password;
public String getPassword()
return this.password;
public void setAccountType( String accountType )
this.accountType = accountType;
public String getAccountType()
return this.accountType;
public void setTrashTransferAccount( String trashTransferAccount )
this.trashTransferAccount = trashTransferAccount;
public String getTrashTransferAccount()
return this.trashTransferAccount;
public void setTrashAccountNumber( String trashAccountNumber )
this.trashAccountNumber = trashAccountNumber;
public String getTrashAccountNumber()
return this.trashAccountNumber;
public void setSystemMessage( String systemMessage )
this.systemMessage = systemMessage;
public String getSystemMessage()
return this.systemMessage;
public void setSecureFlag( boolean secureFlag )
this.secureFlag = secureFlag;
public boolean getSecureFlag()
return this.secureFlag;
}This exception means that xml namespaces are different.
Etc. soap has xml element which doesn't belong to namespace of parent xml element and namespace is set without prefix.
I had such problem.
Try to set namespace prefix for this element.
Example:
<el1>
<el2 xmlns="http://..."/>
</el1>
Should be
<el1>
<q:el2 xmlns:q="http://..."/>
</el1> -
How to define callback in conversation webservice on WLS
Hello,
I have a very simple Conversation WS (source included) for WebLogic and I like to use it in BPEL process. But BPEL Designer does not recognize callback method. I can see callback method as standard WS operation for synchronous call. Please help me. When I use this WS in WLI (Web Logic Integration Server) everything is ok.
Thank you for your help.
JMELICHN
--- Code of WS: --------------------------------------
package ws;
public class SimpleAsynchrWS implements com.bea.jws.WebService
* @common:control
* @jc:timer timeout="10 s"
private com.bea.control.TimerControl timer;
public Callback callback;
static final long serialVersionUID = 1L;
private String internal = "";
* @common:operation
* @jws:conversation phase="start"
public void setString(String text)
this.internal = text;
this.timer.start();
return;
public interface Callback extends com.bea.control.ServiceControl
* @jws:conversation phase="finish"
void textCallback(String text);
public void timer_onTimeout(long time)
callback.textCallback(internal);
timer.stop();I'm allmost sure that they are using SOAP converation. I attached WSDL generated for my service:
<?xml version="1.0" encoding="utf-8" ?>
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
- <types>
- <s:schema xmlns:s="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.openuri.org/">
- <s:element name="setString">
- <s:complexType>
- <s:sequence>
<s:element name="text" type="s:string" minOccurs="0" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="setStringResponse">
- <s:complexType>
<s:sequence />
</s:complexType>
</s:element>
- <s:element name="textCallbackResponse">
- <s:complexType>
<s:sequence />
</s:complexType>
</s:element>
- <s:element name="textCallback">
- <s:complexType>
- <s:sequence>
<s:element name="text" type="s:string" minOccurs="0" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
- <s:schema elementFormDefault="qualified" targetNamespace="http://www.openuri.org/2002/04/soap/conversation/">
<s:element name="StartHeader" type="conv:StartHeader" />
<s:element name="ContinueHeader" type="conv:ContinueHeader" />
<s:element name="CallbackHeader" type="conv:CallbackHeader" />
- <s:complexType name="StartHeader">
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="conversationID" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="callbackLocation" type="s:string" />
</s:sequence>
</s:complexType>
- <s:complexType name="ContinueHeader">
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="conversationID" type="s:string" />
</s:sequence>
</s:complexType>
- <s:complexType name="CallbackHeader">
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="conversationID" type="s:string" />
</s:sequence>
</s:complexType>
</s:schema>
</types>
- <message name="setStringSoapIn">
<part name="parameters" element="s0:setString" />
</message>
- <message name="setStringSoapOut">
<part name="parameters" element="s0:setStringResponse" />
</message>
- <message name="textCallbackSoapIn">
<part name="parameters" element="s0:textCallbackResponse" />
</message>
- <message name="textCallbackSoapOut">
<part name="parameters" element="s0:textCallback" />
</message>
- <message name="setStringHttpGetIn">
<part name="text" type="s:string" />
</message>
<message name="setStringHttpGetOut" />
<message name="textCallbackHttpGetIn" />
- <message name="textCallbackHttpGetOut">
<part name="text" type="s:string" />
</message>
- <message name="setStringHttpPostIn">
<part name="text" type="s:string" />
</message>
<message name="setStringHttpPostOut" />
<message name="textCallbackHttpPostIn" />
- <message name="textCallbackHttpPostOut">
<part name="text" type="s:string" />
</message>
- <message name="StartHeader_literal">
<part name="StartHeader" element="conv:StartHeader" />
</message>
- <message name="CallbackHeader_literal">
<part name="CallbackHeader" element="conv:CallbackHeader" />
</message>
- <portType name="SimpleAsynchrWSSoap">
- <operation name="setString">
<input message="s0:setStringSoapIn" />
<output message="s0:setStringSoapOut" />
</operation>
- <operation name="textCallback">
<output message="s0:textCallbackSoapOut" />
<input message="s0:textCallbackSoapIn" />
</operation>
</portType>
- <portType name="SimpleAsynchrWSHttpGet">
- <operation name="setString">
<input message="s0:setStringHttpGetIn" />
<output message="s0:setStringHttpGetOut" />
</operation>
- <operation name="textCallback">
<output message="s0:textCallbackHttpGetOut" />
<input message="s0:textCallbackHttpGetIn" />
</operation>
</portType>
- <portType name="SimpleAsynchrWSHttpPost">
- <operation name="setString">
<input message="s0:setStringHttpPostIn" />
<output message="s0:setStringHttpPostOut" />
</operation>
- <operation name="textCallback">
<output message="s0:textCallbackHttpPostOut" />
<input message="s0:textCallbackHttpPostIn" />
</operation>
</portType>
- <binding name="SimpleAsynchrWSSoap" type="s0:SimpleAsynchrWSSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <operation name="setString">
<soap:operation soapAction="http://www.openuri.org/setString" style="document" />
<cw:transition phase="start" />
- <input>
<soap:body use="literal" />
<soap:header xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" wsdl:required="true" message="s0:StartHeader_literal" part="StartHeader" use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="textCallback">
<soap:operation soapAction="http://www.openuri.org/textCallback" style="document" />
<cw:transition phase="finish" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
<soap:header xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" wsdl:required="true" message="s0:CallbackHeader_literal" part="CallbackHeader" use="literal" />
</output>
</operation>
</binding>
- <binding name="SimpleAsynchrWSHttpGet" type="s0:SimpleAsynchrWSHttpGet">
<http:binding verb="GET" />
- <operation name="setString">
<http:operation location="/setString" />
<cw:transition phase="start" />
- <input>
<http:urlEncoded />
</input>
<output />
</operation>
- <operation name="textCallback">
<http:operation location="/textCallback" />
<cw:transition phase="finish" />
- <input>
<mime:mimeXml part="Body" />
</input>
- <output>
<http:urlEncoded />
</output>
</operation>
</binding>
- <binding name="SimpleAsynchrWSHttpPost" type="s0:SimpleAsynchrWSHttpPost">
<http:binding verb="POST" />
- <operation name="setString">
<http:operation location="/setString" />
<cw:transition phase="start" />
- <input>
<mime:content type="application/x-www-form-urlencoded" />
</input>
<output />
</operation>
- <operation name="textCallback">
<http:operation location="/textCallback" />
<cw:transition phase="finish" />
- <input>
<mime:mimeXml part="Body" />
</input>
- <output>
<mime:content type="application/x-www-form-urlencoded" />
</output>
</operation>
</binding>
- <service name="SimpleAsynchrWS">
- <port name="SimpleAsynchrWSSoap" binding="s0:SimpleAsynchrWSSoap">
<soap:address location="http://ntb22:7001/eShopWs/ws/SimpleAsynchrWS.jws" />
</port>
- <port name="SimpleAsynchrWSHttpGet" binding="s0:SimpleAsynchrWSHttpGet">
<http:address location="http://ntb22:7001/eShopWs/ws/SimpleAsynchrWS.jws" />
</port>
- <port name="SimpleAsynchrWSHttpPost" binding="s0:SimpleAsynchrWSHttpPost">
<http:address location="http://ntb22:7001/eShopWs/ws/SimpleAsynchrWS.jws" />
</port>
</service>
</definitions>
I'd like to try definition of explicite correlationSet in BPEL, but i think that callback must be recognized.
Thnak you for yor attention.
JMELICHN -
SOAP Help Building Request With Nested Tags
I have been struggling with Apache SOAP to try and build a request. Specifically, I don't understand how to embed these elements into the Header and Body sections. More specifically, how to do this nested tags.
Thanks for any advice you can provide.
Below, is a sample of the request I need to send to the server.
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<ContinueHeader xmlns="http://www.openuri.org/2002/04/soap/conversation/">
<uniqueID>111111111111111</uniqueID>
</ContinueHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<subscribe xmlns="http://xxxx/xxxx/xxxx/service">
<comHdr>
<WSCredentials>
<UserName>xxxxxxx</UserName>
<Password>xxxxxxxx</Password>
</WSCredentials>
</comHdr>
</subscribe>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>I can add the <UserName>xxxxxxx</UserName> <Password>xxxxxxxx</Password> to the body of the request using:
Vector parms = new Vector();
parms.addElement(new Parameter("UserName", String.class, username, null));
parms.addElement(new Parameter("Token", String.class, password, null));
call.setParams(parms);I just don't know how to add those tags within the <comHdr> and <WSCredentials> tags. -
Wscompile No SOAP address specified
I have seen this same post over and over again. I haven't seen a single real answer for it. SO here we go again.....
warning: ignoring port "HelloHttpGet": no SOAP address specified
warning: ignoring port "HelloHttpPost": no SOAP address specified
these are the errors. I read a bug article based on this, but it was in regards to a .Net project and not a java one.
I would assume that if those ports were ignored, my project won't work, so i really really need to figure this out.
here is my config.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<wsdl location="Hello.wsdl"
packageName="com.c2bmc"/>
</configuration>
and here is my wsdl
<?xml version="1.0" encoding="utf-8"?>
<!-- @editor-info:link autogen="true" source="Hello.jws" -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
<types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.openuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema">
<s:element name="getPlanList">
<s:complexType>
<s:sequence/>
</s:complexType>
</s:element>
<s:element name="getPlanListResponse">
<s:complexType>
<s:sequence>
<s:element name="getPlanListResult" type="s:string" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string"/>
</s:schema>
</types>
<message name="getPlanListSoapIn">
<part name="parameters" element="s0:getPlanList"/>
</message>
<message name="getPlanListSoapOut">
<part name="parameters" element="s0:getPlanListResponse"/>
</message>
<message name="getPlanListHttpGetIn"/>
<message name="getPlanListHttpGetOut">
<part name="Body" element="s0:string"/>
</message>
<message name="getPlanListHttpPostIn"/>
<message name="getPlanListHttpPostOut">
<part name="Body" element="s0:string"/>
</message>
<portType name="HelloSoap">
<operation name="getPlanList">
<input message="s0:getPlanListSoapIn"/>
<output message="s0:getPlanListSoapOut"/>
</operation>
</portType>
<portType name="HelloHttpGet">
<operation name="getPlanList">
<input message="s0:getPlanListHttpGetIn"/>
<output message="s0:getPlanListHttpGetOut"/>
</operation>
</portType>
<portType name="HelloHttpPost">
<operation name="getPlanList">
<input message="s0:getPlanListHttpPostIn"/>
<output message="s0:getPlanListHttpPostOut"/>
</operation>
</portType>
<binding name="HelloSoap" type="s0:HelloSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getPlanList">
<soap:operation soapAction="http://www.openuri.org/getPlanList" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<binding name="HelloHttpGet" type="s0:HelloHttpGet">
<http:binding verb="GET"/>
<operation name="getPlanList">
<http:operation location="/getPlanList"/>
<input>
<http:urlEncoded/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<binding name="HelloHttpPost" type="s0:HelloHttpPost">
<http:binding verb="POST"/>
<operation name="getPlanList">
<http:operation location="/getPlanList"/>
<input>
<mime:content type="application/x-www-form-urlencoded"/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<service name="Hello">
<port name="HelloSoap" binding="s0:HelloSoap">
<soap:address location="http://localhost:7001/FirstJWSProject/Hello.jws"/>
</port>
<port name="HelloHttpGet" binding="s0:HelloHttpGet">
<http:address location="http://localhost:7001/FirstJWSProject/Hello.jws"/>
</port>
<port name="HelloHttpPost" binding="s0:HelloHttpPost">
<http:address location="http://localhost:7001/FirstJWSProject/Hello.jws"/>
</port>
</service>
</definitions>
Thanks for anyone who takes the time to help.
JasonI have seen this same post over and over again. I haven't seen a single real answer for it. SO here we go again.....
warning: ignoring port "HelloHttpGet": no SOAP address specified
warning: ignoring port "HelloHttpPost": no SOAP address specified
these are the errors. I read a bug article based on this, but it was in regards to a .Net project and not a java one.
I would assume that if those ports were ignored, my project won't work, so i really really need to figure this out.
here is my config.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<wsdl location="Hello.wsdl"
packageName="com.c2bmc"/>
</configuration>
and here is my wsdl
<?xml version="1.0" encoding="utf-8"?>
<!-- @editor-info:link autogen="true" source="Hello.jws" -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
<types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.openuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema">
<s:element name="getPlanList">
<s:complexType>
<s:sequence/>
</s:complexType>
</s:element>
<s:element name="getPlanListResponse">
<s:complexType>
<s:sequence>
<s:element name="getPlanListResult" type="s:string" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string"/>
</s:schema>
</types>
<message name="getPlanListSoapIn">
<part name="parameters" element="s0:getPlanList"/>
</message>
<message name="getPlanListSoapOut">
<part name="parameters" element="s0:getPlanListResponse"/>
</message>
<message name="getPlanListHttpGetIn"/>
<message name="getPlanListHttpGetOut">
<part name="Body" element="s0:string"/>
</message>
<message name="getPlanListHttpPostIn"/>
<message name="getPlanListHttpPostOut">
<part name="Body" element="s0:string"/>
</message>
<portType name="HelloSoap">
<operation name="getPlanList">
<input message="s0:getPlanListSoapIn"/>
<output message="s0:getPlanListSoapOut"/>
</operation>
</portType>
<portType name="HelloHttpGet">
<operation name="getPlanList">
<input message="s0:getPlanListHttpGetIn"/>
<output message="s0:getPlanListHttpGetOut"/>
</operation>
</portType>
<portType name="HelloHttpPost">
<operation name="getPlanList">
<input message="s0:getPlanListHttpPostIn"/>
<output message="s0:getPlanListHttpPostOut"/>
</operation>
</portType>
<binding name="HelloSoap" type="s0:HelloSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getPlanList">
<soap:operation soapAction="http://www.openuri.org/getPlanList" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<binding name="HelloHttpGet" type="s0:HelloHttpGet">
<http:binding verb="GET"/>
<operation name="getPlanList">
<http:operation location="/getPlanList"/>
<input>
<http:urlEncoded/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<binding name="HelloHttpPost" type="s0:HelloHttpPost">
<http:binding verb="POST"/>
<operation name="getPlanList">
<http:operation location="/getPlanList"/>
<input>
<mime:content type="application/x-www-form-urlencoded"/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<service name="Hello">
<port name="HelloSoap" binding="s0:HelloSoap">
<soap:address location="http://localhost:7001/FirstJWSProject/Hello.jws"/>
</port>
<port name="HelloHttpGet" binding="s0:HelloHttpGet">
<http:address location="http://localhost:7001/FirstJWSProject/Hello.jws"/>
</port>
<port name="HelloHttpPost" binding="s0:HelloHttpPost">
<http:address location="http://localhost:7001/FirstJWSProject/Hello.jws"/>
</port>
</service>
</definitions>
Thanks for anyone who takes the time to help.
Jason -
I Need to dynamically generate a SOAP request from the WSDL file.
What should be my approach , is there any API which could help me in theis WSDL to SOAP conversion ?HI,
WSDL to SOAPThere are tools like SoapUI and Altova's tools that generate sample SOAP requests for operations defined in a WSDL and I am looking to do similar thing.
Same thing Discuss in another Forums
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=51&t=004863Some Related Links
WSDL to SOAP
http://www.iona.com/solutions/opensource/prodsol/cxf.htm
Apache CXF 2.0
http://incubator.apache.org/projects/cxf.htmlMessage was edited by:
drvijayy2k2
*********Duck********** -
hi,
We need to provide a service for a partner. Which performances better-- direct JDBC from partner's application server to our database, or we host SOAP service and implement soap client call in partner's application server? Also, can JDBC go through firewall?
Thanks,
DeanWe need to provide a service for a partner. Which
performances better-- direct JDBC from partner's
application server to our database, or we host SOAP
service and implement soap client call in partner's
application server? Also, can JDBC go through
firewall?Generally speaking, less layers are faster, but the answer is seldom that simple. The JDBC implementation may require multiple round trips across the network whereas you can craft a SOAP conversation with HTTP 1.1 that will (in the large) make only a single roundtrip and that can be a much greater performance factor.
You CAN get a JDBC link to work across a firewall, as long as you open the right ports ;->
Chuck -
Error deserializing arguments, xml tag without a recognized type
I am trying to run a webservice created using Weblogic Workshop 8.1sp2 that communicates
with an ejb control. When I test in debug mode, I get the above error, specifically:
<detail>
<jwErr:jwErrorDetail xmlns:jwErr="http://www.bea.com/2002/04/jwErrorDetail/">
com.bea.wlw.runtime.core.request.RequestValidationException: Error deserializing
arguments.
Encountered an xml tag without a recognized type: the type must be declared with
an xsi:type attribute.
Caused by: com.bea.xml.marshal.XmlEncodingException: Encountered an xml tag with
out a recognized type: the type must be declared with an xsi:type attribute.
</detail>
I am passing a Request object to the jws method (to the ejb) that has a Collection
as an instance member. This Collection references objects of another type, Param
(code for both objects below). Before passing the object, I convert the Collection
to an array of objects. When I call the operation via a java client, I get the
above message.
In Workshop, I've included the Request and Param classes as the parameter xml
and the soap style is rpc. I've tested the ejb by itself and it is working fine.
Request.java:
import java.util.*;
public class Request implements java.io.Serializable
protected Collection params=null;
public Collection getParams()
{ return params; }
public void setParams(Collection data)
{ params=data; }
Param.java:
public class Param implements java.io.Serializable
private String name=null;
private Object value=null;
public String getName()
{ return name; }
public void setName(String data)
{ name = data; }
public Object getValue()
{ return value; }
public void setValue(Object data)
{ value=data; }
Here's the code from the jws:
public class MyWS implements com.bea.jws.WebService
* @common:control
private control.PSEjbControl psEJB;
static final long serialVersionUID = 1L;
* @common:operation
* @jws:parameter-xml
* include-java-types="mypackage.Request mypackage.Param"
* @jws:protocol soap-style="rpc"
public void addData(mypackage.Request arg0) throws java.rmi.RemoteException
System.out.println("arg0 : " + arg0);
psEJB.addData(arg0);
*Note: in the server console, arg0 comes through as null when called from my client.
Here's the bit from my client:
import weblogic.jws.proxies.*;
import org.openuri.www.encodedTypes.Request;
import org.openuri.www.encodedTypes.Param;
public void go(String wsdl) throws Exception {
MyWSSoap mw = null;
mw = new MyWS_Impl().getMyWSSoap();
Request req = new Request();
Collection reqColl = new ArrayList();
Param param1 = new Param();
param1.setName("NAME");
param1.setValue("Joe Tester");
Param param2 = new Param();
param2.setName("ADDRESS");
param2.setValue("345 Test Drive");
reqColl.add(param1);
reqColl.add(param2);
Object[] obs = reqColl.toArray();
req.setParams(obs);
mw.addData(req);
Not sure if this enough to go by. Please let me know if you need more information.
Any help is really appreciated. Thanks.Hi Keith,
My only suggestion is to factor out the java.util.Collection (see the
docs here [1]) with either primitive types or XMLBeans [2].
Sorry, not much help. You might also ask your question in the workshop
[3] newsgroup.
Bruce
[1]
http://e-docs.bea.com/workshop/docs81/doc/en/integration/reference/refJavaClassConversion.html
[2]
http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/xmlbeans/conXMLBeansSupportBuiltInSchemaTypes.html
[3]
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.workshop
Keith wrote:
>
Hi Bruce, thanks for the reply. I set the operation for document-style soap and
still get the deserialization exception as mentioned in my original note. Below
is the wsdl. Note: in my original note, the problematic operation was addData()
which is now named addBusinessLocation(). As always, your help is greatly appreciated.
Keith
<?xml version="1.0" encoding="utf-8"?>
<!-- @editor-info:link autogen="true" source="PublicServiceWS.jws" -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/"
xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
targetNamespace="http://www.openuri.org/">
<types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.openuri.org/"
xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:ope="http://www.openuri.org/">
<s:element name="addBusinessLocation">
<s:complexType>
<s:sequence>
<s:element name="arg0" type="ope:Request" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="addBusinessLocationResponse">
<s:complexType>
<s:sequence/>
</s:complexType>
</s:element>
<s:element name="getBusinessLocation">
<s:complexType>
<s:sequence/>
</s:complexType>
</s:element>
<s:element name="getBusinessLocationResponse">
<s:complexType>
<s:sequence>
<s:element name="getBusinessLocationResult" type="ope:Response" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="Response" nillable="true" type="ope:Response"/>
<s:element name="repeat">
<s:complexType>
<s:sequence>
<s:element name="in" type="s:string" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="repeatResponse">
<s:complexType>
<s:sequence>
<s:element name="repeatResult" type="s:string" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string"/>
<s:complexType name="Request">
<s:sequence>
<s:element name="Params" type="ope:Collection" minOccurs="0"/>
</s:sequence>
</s:complexType>
<s:complexType name="Collection">
<s:sequence>
<s:element name="item" type="s:anyType" nillable="true" minOccurs="0"
maxOccurs="unbounded"/>
</s:sequence>
</s:complexType>
<s:complexType name="Param">
<s:sequence>
<s:element name="Name" type="s:string" minOccurs="0"/>
<s:element name="Value" type="s:anyType" minOccurs="0"/>
</s:sequence>
</s:complexType>
<s:complexType name="Response">
<s:complexContent>
<s:extension base="ope:Request">
<s:sequence/>
</s:extension>
</s:complexContent>
</s:complexType>
</s:schema>
</types>
<message name="addBusinessLocationSoapIn">
<part name="parameters" element="s0:addBusinessLocation"/>
</message>
<message name="addBusinessLocationSoapOut">
<part name="parameters" element="s0:addBusinessLocationResponse"/>
</message>
<message name="getBusinessLocationSoapIn">
<part name="parameters" element="s0:getBusinessLocation"/>
</message>
<message name="getBusinessLocationSoapOut">
<part name="parameters" element="s0:getBusinessLocationResponse"/>
</message>
<message name="repeatSoapIn">
<part name="parameters" element="s0:repeat"/>
</message>
<message name="repeatSoapOut">
<part name="parameters" element="s0:repeatResponse"/>
</message>
<message name="getBusinessLocationHttpGetIn"/>
<message name="getBusinessLocationHttpGetOut">
<part name="Body" element="s0:Response"/>
</message>
<message name="repeatHttpGetIn">
<part name="in" type="s:string"/>
</message>
<message name="repeatHttpGetOut">
<part name="Body" element="s0:string"/>
</message>
<message name="getBusinessLocationHttpPostIn"/>
<message name="getBusinessLocationHttpPostOut">
<part name="Body" element="s0:Response"/>
</message>
<message name="repeatHttpPostIn">
<part name="in" type="s:string"/>
</message>
<message name="repeatHttpPostOut">
<part name="Body" element="s0:string"/>
</message>
<portType name="PublicServiceWSSoap">
<operation name="addBusinessLocation">
<input message="s0:addBusinessLocationSoapIn"/>
<output message="s0:addBusinessLocationSoapOut"/>
</operation>
<operation name="getBusinessLocation">
<input message="s0:getBusinessLocationSoapIn"/>
<output message="s0:getBusinessLocationSoapOut"/>
</operation>
<operation name="repeat">
<input message="s0:repeatSoapIn"/>
<output message="s0:repeatSoapOut"/>
</operation>
</portType>
<portType name="PublicServiceWSHttpGet">
<operation name="getBusinessLocation">
<input message="s0:getBusinessLocationHttpGetIn"/>
<output message="s0:getBusinessLocationHttpGetOut"/>
</operation>
<operation name="repeat">
<input message="s0:repeatHttpGetIn"/>
<output message="s0:repeatHttpGetOut"/>
</operation>
</portType>
<portType name="PublicServiceWSHttpPost">
<operation name="getBusinessLocation">
<input message="s0:getBusinessLocationHttpPostIn"/>
<output message="s0:getBusinessLocationHttpPostOut"/>
</operation>
<operation name="repeat">
<input message="s0:repeatHttpPostIn"/>
<output message="s0:repeatHttpPostOut"/>
</operation>
</portType>
<binding name="PublicServiceWSSoap" type="s0:PublicServiceWSSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="addBusinessLocation">
<soap:operation soapAction="http://www.openuri.org/addBusinessLocation"
style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getBusinessLocation">
<soap:operation soapAction="http://www.openuri.org/getBusinessLocation"
style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="repeat">
<soap:operation soapAction="http://www.openuri.org/repeat" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<binding name="PublicServiceWSHttpGet" type="s0:PublicServiceWSHttpGet">
<http:binding verb="GET"/>
<operation name="getBusinessLocation">
<http:operation location="/getBusinessLocation"/>
<input>
<http:urlEncoded/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
<operation name="repeat">
<http:operation location="/repeat"/>
<input>
<http:urlEncoded/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<binding name="PublicServiceWSHttpPost" type="s0:PublicServiceWSHttpPost">
<http:binding verb="POST"/>
<operation name="getBusinessLocation">
<http:operation location="/getBusinessLocation"/>
<input>
<mime:content type="application/x-www-form-urlencoded"/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
<operation name="repeat">
<http:operation location="/repeat"/>
<input>
<mime:content type="application/x-www-form-urlencoded"/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<service name="PublicServiceWS">
<port name="PublicServiceWSSoap" binding="s0:PublicServiceWSSoap">
<soap:address location="http://localhost:8010/WebService/PublicServiceWS.jws"/>
</port>
<port name="PublicServiceWSHttpGet" binding="s0:PublicServiceWSHttpGet">
<http:address location="http://localhost:8010/WebService/PublicServiceWS.jws"/>
</port>
<port name="PublicServiceWSHttpPost" binding="s0:PublicServiceWSHttpPost">
<http:address location="http://localhost:8010/WebService/PublicServiceWS.jws"/>
</port>
</service>
</definitions>
Bruce Stephens <[email protected]> wrote:
Hi Keith,
As a quick test, you might try changing the protocol style to use
doc/lit (@jws:protocol soap-style="document") to see if this provides
another view on the real issue.
Could you post the generated WSDL?
Thanks,
Bruce
Keith wrote:
I am trying to run a webservice created using Weblogic Workshop 8.1sp2that communicates
with an ejb control. When I test in debug mode, I get the above error,specifically:
<detail>
<jwErr:jwErrorDetail xmlns:jwErr="http://www.bea.com/2002/04/jwErrorDetail/">
com.bea.wlw.runtime.core.request.RequestValidationException: Errordeserializing
arguments.
Encountered an xml tag without a recognized type: the type must bedeclared with
an xsi:type attribute.
Caused by: com.bea.xml.marshal.XmlEncodingException: Encountered anxml tag with
out a recognized type: the type must be declared with an xsi:type attribute.
</detail>
I am passing a Request object to the jws method (to the ejb) that hasa Collection
as an instance member. This Collection references objects of anothertype, Param
(code for both objects below). Before passing the object, I convertthe Collection
to an array of objects. When I call the operation via a java client,I get the
above message.
In Workshop, I've included the Request and Param classes as the parameterxml
and the soap style is rpc. I've tested the ejb by itself and it isworking fine.
Request.java:
import java.util.*;
public class Request implements java.io.Serializable
protected Collection params=null;
public Collection getParams()
{ return params; }
public void setParams(Collection data)
{ params=data; }
Param.java:
public class Param implements java.io.Serializable
private String name=null;
private Object value=null;
public String getName()
{ return name; }
public void setName(String data)
{ name = data; }
public Object getValue()
{ return value; }
public void setValue(Object data)
{ value=data; }
Here's the code from the jws:
public class MyWS implements com.bea.jws.WebService
* @common:control
private control.PSEjbControl psEJB;
static final long serialVersionUID = 1L;
* @common:operation
* @jws:parameter-xml
* include-java-types="mypackage.Request mypackage.Param"
* @jws:protocol soap-style="rpc"
public void addData(mypackage.Request arg0) throws java.rmi.RemoteException
System.out.println("arg0 : " + arg0);
psEJB.addData(arg0);
*Note: in the server console, arg0 comes through as null when calledfrom my client.
Here's the bit from my client:
import weblogic.jws.proxies.*;
import org.openuri.www.encodedTypes.Request;
import org.openuri.www.encodedTypes.Param;
public void go(String wsdl) throws Exception {
MyWSSoap mw = null;
mw = new MyWS_Impl().getMyWSSoap();
Request req = new Request();
Collection reqColl = new ArrayList();
Param param1 = new Param();
param1.setName("NAME");
param1.setValue("Joe Tester");
Param param2 = new Param();
param2.setName("ADDRESS");
param2.setValue("345 Test Drive");
reqColl.add(param1);
reqColl.add(param2);
Object[] obs = reqColl.toArray();
req.setParams(obs);
mw.addData(req);
Not sure if this enough to go by. Please let me know if you need moreinformation.
Any help is really appreciated. Thanks. -
Difficulty in WS_security
I am using Workshop vesrion 8.1.4. I have coded an application exactly similar to the security.wsse.reqResp.mycompany.MyCompany & security.wsse.reqResp.client.Client in sample directory which comes with Workshop. I am using the exactly the same key store used in the sample. The sample programs work fine, while something I did exactly similar to samples is not working.
The problem is when I run the client, it does not seem to apply the policies resulting in the error
below. I am not sure why it is not applying signature as per the policy file defined for the control used in the client. Thnakful, if some one can help. Can provide more info, if needed. Thnaks.
<faultcode> SOAP-ENV:Client </faultcode>
<faultstring> EJB Exception: ; nested exception is:
com.bea.wlw.runtime.jws.wssecurity.exception.WLWWSSEException: Policy requires Message to be signed, Message was not signed. </faultstring>
<detail>
java.rmi.RemoteException: EJB Exception: ; nested exception is:
com.bea.wlw.runtime.jws.wssecurity.exception.WLWWSSEException: Policy requires Message to be signed, Message was not signed.
at weblogic.ejb20.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:102)
On the service side, I have the following jws file:
package security.wsse.reqresp.service;
* @jws:ws-security-service file="MyCompanySecurityPolicy.wsse"
* @common:target-namespace namespace="http://workshop.bea.com/MyCompany"
public class GreetGuest implements com.bea.jws.WebService
static final long serialVersionUID = 1L;
* @common:operation
public String SayHello(String aGuest)
return "Welcome " + aGuest + " This is a Secure Service";
The policy is exactly as in the sample ( in fact I cut and pasted from sample)
<wsSecurityPolicy xsi:schemaLocation="WSSecurity-policy.xsd" xmlns="http://www.bea.com/2003/03/wsse/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wsSecurityOut>
<!--
Accompany the SOAP message with a valid username and password
-->
<userNameToken>
<userName>weblogic</userName>
<password type="TEXT">weblogic</password>
</userNameToken>
<!--
Encrypt the SOAP message with the recipient's (MyCompany.jws) public key.
Only the recipient's private key can decrypt it.
Ensures the confidentiality of the SOAP message.
(This process requires that the sender's keystore already contains
a digital certificate containing the recients public key.)
-->
<encryption>
<encryptionKey>
<alias>mycompany</alias>
</encryptionKey>
</encryption>
<!--
Sign the SOAP message with the sender's (Client.jws) private key.
Only the sender's public key can validate the signature.
Ensures the authenticity of the sender, i.e., that the sender is
in fact the source of the SOAP message.
-->
<signatureKey>
<alias>client1</alias>
<password>password</password>
</signatureKey>
</wsSecurityOut>
<wsSecurityIn>
<!--
Incoming SOAP message must be accompanied by a valid username
and password.
-->
<token tokenType="username"/>
<!--
Incoming SOAP messages must be encrypted with client.jws's
public key. The alias and password to access the client.jws's
decrypting private key in the keystore are provided by
the <decryptionKey> element below.
-->
<encryptionRequired>
<decryptionKey>
<alias>client1</alias>
<password>password</password>
</decryptionKey>
</encryptionRequired>
<!--
Incoming SOAP messages must be digitally signed with the sender's
private key.
The sender's public key is used to validate the signature.
-->
<signatureRequired>true</signatureRequired>
</wsSecurityIn>
<!--
Look for the client.jks keystore in the default location, the server domain
root, in this case, BEA_HOME\weblogic81\samples\domains\workshop.
-->
<keyStore>
<keyStoreLocation>samples_client.jks</keyStoreLocation>
<keyStorePassword>password</keyStorePassword>
</keyStore>
</wsSecurityPolicy>
on the client side:
I have jws :
package security.wsse.reqresp.client;
* @common:target-namespace namespace="http://workshop.bea.com/Client"
public class Client implements com.bea.jws.WebService
* @common:control
private security.wsse.reqresp.client.SecuredGreeting securedGreetingControl;
* @common:control
private security.wsse.reqresp.client.GreetGuest greetGuestControl;
static final long serialVersionUID = 1L;
* @common:operation
public void getGreeted(String myName)
String aReturnValue = securedGreetingControl.SayHello(myName);
System.out.println("Message from Service=" + aReturnValue );
The control in the client , I used is:
package security.wsse.reqresp.client;
* @jc:location http-url="http://localhost:7001/TestWebServicesProject/security/wsse/reqresp/service/GreetGuest.jws"
* @jc:wsdl file="#GreetGuestWsdl"
* @editor-info:link autogen-style="java" source="GreetGuestContract.wsdl" autogen="true"
public interface SecuredGreeting extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
public java.lang.String SayHello (java.lang.String aGuest);
static final long serialVersionUID = 1L;
/** @common:define name="GreetGuestWsdl" value::
<?xml version="1.0" encoding="utf-8"?>
<!-- @editor-info:link autogen="true" source="GreetGuest.jws" -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://workshop.bea.com/MyCompany" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://workshop.bea.com/MyCompany">
<types>
<s:schema elementFormDefault="qualified" targetNamespace="http://workshop.bea.com/MyCompany" xmlns:s="http://www.w3.org/2001/XMLSchema">
<s:element name="SayHello">
<s:complexType>
<s:sequence>
<s:element name="aGuest" type="s:string" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="SayHelloResponse">
<s:complexType>
<s:sequence>
<s:element name="SayHelloResult" type="s:string" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string"/>
</s:schema>
</types>
<message name="SayHelloSoapIn">
<part name="parameters" element="s0:SayHello"/>
</message>
<message name="SayHelloSoapOut">
<part name="parameters" element="s0:SayHelloResponse"/>
</message>
<message name="SayHelloHttpGetIn">
<part name="aGuest" type="s:string"/>
</message>
<message name="SayHelloHttpGetOut">
<part name="Body" element="s0:string"/>
</message>
<message name="SayHelloHttpPostIn">
<part name="aGuest" type="s:string"/>
</message>
<message name="SayHelloHttpPostOut">
<part name="Body" element="s0:string"/>
</message>
<portType name="GreetGuestSoap">
<operation name="SayHello">
<input message="s0:SayHelloSoapIn"/>
<output message="s0:SayHelloSoapOut"/>
</operation>
</portType>
<portType name="GreetGuestHttpGet">
<operation name="SayHello">
<input message="s0:SayHelloHttpGetIn"/>
<output message="s0:SayHelloHttpGetOut"/>
</operation>
</portType>
<portType name="GreetGuestHttpPost">
<operation name="SayHello">
<input message="s0:SayHelloHttpPostIn"/>
<output message="s0:SayHelloHttpPostOut"/>
</operation>
</portType>
<binding name="GreetGuestSoap" type="s0:GreetGuestSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="SayHello">
<soap:operation soapAction="http://workshop.bea.com/MyCompany/SayHello" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<binding name="GreetGuestHttpGet" type="s0:GreetGuestHttpGet">
<http:binding verb="GET"/>
<operation name="SayHello">
<http:operation location="/SayHello"/>
<input>
<http:urlEncoded/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<binding name="GreetGuestHttpPost" type="s0:GreetGuestHttpPost">
<http:binding verb="POST"/>
<operation name="SayHello">
<http:operation location="/SayHello"/>
<input>
<mime:content type="application/x-www-form-urlencoded"/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<service name="GreetGuest">
<port name="GreetGuestSoap" binding="s0:GreetGuestSoap">
<soap:address location="http://localhost:7001/TestWebServicesProject/security/wsse/reqresp/service/GreetGuest.jws"/>
</port>
<port name="GreetGuestHttpGet" binding="s0:GreetGuestHttpGet">
<http:address location="http://localhost:7001/TestWebServicesProject/security/wsse/reqresp/service/GreetGuest.jws"/>
</port>
<port name="GreetGuestHttpPost" binding="s0:GreetGuestHttpPost">
<http:address location="http://localhost:7001/TestWebServicesProject/security/wsse/reqresp/service/GreetGuest.jws"/>
</port>
</service>
</definitions>
The policy file for the control is:
<wsSecurityPolicy xsi:schemaLocation="WSSecurity-policy.xsd" xmlns="http://www.bea.com/2003/03/wsse/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wsSecurityOut>
<!--
Accompany the SOAP message with a valid username and password
-->
<userNameToken>
<userName>weblogic</userName>
<password type="TEXT">weblogic</password>
</userNameToken>
<!--
Encrypt the SOAP message with the recipient's (MyCompany.jws) public key.
Only the recipient's private key can decrypt it.
Ensures the confidentiality of the SOAP message.
(This process requires that the sender's keystore already contains
a digital certificate containing the recients public key.)
-->
<encryption>
<encryptionKey>
<alias>mycompany</alias>
</encryptionKey>
</encryption>
<!--
Sign the SOAP message with the sender's (Client.jws) private key.
Only the sender's public key can validate the signature.
Ensures the authenticity of the sender, i.e., that the sender is
in fact the source of the SOAP message.
-->
<signatureKey>
<alias>client1</alias>
<password>password</password>
</signatureKey>
</wsSecurityOut>
<wsSecurityIn>
<!--
Incoming SOAP message must be accompanied by a valid username
and password.
-->
<token tokenType="username"/>
<!--
Incoming SOAP messages must be encrypted with client.jws's
public key. The alias and password to access the client.jws's
decrypting private key in the keystore are provided by
the <decryptionKey> element below.
-->
<encryptionRequired>
<decryptionKey>
<alias>client1</alias>
<password>password</password>
</decryptionKey>
</encryptionRequired>
<!--
Incoming SOAP messages must be digitally signed with the sender's
private key.
The sender's public key is used to validate the signature.
-->
<signatureRequired>true</signatureRequired>
</wsSecurityIn>
<!--
Look for the client.jks keystore in the default location, the server domain
root, in this case, BEA_HOME\weblogic81\samples\domains\workshop.
-->
<keyStore>
<keyStoreLocation>samples_client.jks</keyStoreLocation>
<keyStorePassword>password</keyStorePassword>
</keyStore>
</wsSecurityPolicy>Hi Vijay
It appears like you are not applying the wsse policy on the client side.
Check the jws as well as the control on the Client side. Both do not refer to a wsse policy file
Your code snippets:
Jws:
* @common:target-namespace namespace="http://workshop.bea.com/Client"
public class Client implements com.bea.jws.WebService
Service Control:
* @jc:location http-url="http://localhost:7001/TestWebServicesProject/security/wsse/reqresp/service/GreetGuest.jws"
* @jc:wsdl file="#GreetGuestWsdl"
* @editor-info:link autogen-style="java" source="GreetGuestContract.wsdl" autogen="true"
public interface SecuredGreeting extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
Please refer to the wsse file on the Client side just like how you have done it on the server side.
Vimala- -
Fat Client-Web based architecture design help ?????
Hellow experts
i have recently joined a java project
which is a fat client-web based application.
clients can work from any location or place using the internet
they will connect to the web server which will be provide the data
to the clients application
i am working on the improvement of architecture n design of the project
pls help me in deciding the best and the fastest way to develop this application further.
i am designing a framework based on my experience and
am also doing some research on whats latest which can accelerate
and improve the development process.
here's what i have and want to know what u think abt it.
pls suggest some new good frameworks if you are aware of.
Technologies to be used
Fat client front end : Java Swings
Web server : Tomcat,Struts
Database : Mysql
FrameWorks
Client side
XXXView.Java(is the GUI layer) (where xxx is any module specific name)
|
XXXWebHandle.java(this java file will have the code to
connect to the webserver using the apache httpclient)
it will call a struts action file specifically
the data collected from the gui components will be transformed
into xml and sent to the struts action file.
Server Side
xxxaction.java(this file will parse the xml data from client side
and save it to the datbase using jdbc statements
it will also retrive data and metadata from database using jdbc queries
and convert it into xml and send it back as http response to the XXXwebhandle.java
which then parses back the xml data and puts it on the GUI components of XXXview.java files.
THe Problems
1) the conversion of database query resultset to xml at server and the xml back to fields data
takes a lot of time and is cumbersome to code as we need code the xml
defination pattern for every data exchange between server and client.
we need to remove XML .................is it possible????
can we send data back to client as java objects and if yes then how??.
2) right now we are making JDBC calls to mysql database using a common Utility class file
created for handling all kinds of sql statements and return the data via a hashtable object.
We need to use a ORM tool here............dont know which to use and how to use.
heard of hibernate and EJB.pls suggest which one to use
Overall i would appreciate if someone can suggest me good architecture.
is there any framework readily available for developing these kinda apps
pls guide or give me links where i can get info abt this.
thanks
JagsHellow experts
i have recently joined a java project
which is a fat client-web based application.
clients can work from any location or place using the
internet
they will connect to the web server which will be
provide the data
to the clients application
Okay. As an aside, you can 'fatten' up a standard web page with technologies such as Pushlets or Ajax.
i am working on the improvement of architecture n
design of the project
pls help me in deciding the best and the fastest way
to develop this application further.
i am designing a framework based on my experience and
am also doing some research on whats latest which can
accelerate
and improve the development process.
here's what i have and want to know what u think abt
it.
pls suggest some new good frameworks if you are aware
of.
Technologies to be used
Fat client front end : Java Swings
Web server : Tomcat,Struts
Database : Mysql
IMO, you should take a look at Eclipse's SWT in addition to Java's Swing. SWT has outstanding performance and looks native. Struts is not a web server. Place that entry instead down in 'frameworks'. MySQL is a good database, but I prefer Postgres, which is also free and implements more of ANSI SQL.
FrameWorks
Place Struts here. Also consider using Spring on your server side. BTW, what is Struts doing other than acting as a Controller? Presumably your fat client is the View. No?
Client side
XXXView.Java(is the GUI layer) (where xxx is any
module specific name)
|
XXXWebHandle.java(this java file will have the code
to
connect to the webserver using the apache
httpclient)
it will call a struts action file specifically
the data collected from the gui components will be
transformed
into xml and sent to the struts action file.
Any thoughts of using either RMI, SOAP or JAXB since you will have Java objects on both ends of client and server?
Server Side
xxxaction.java(this file will parse the xml data from
client side
and save it to the datbase using jdbc statements
it will also retrive data and metadata from database
using jdbc queries
and convert it into xml and send it back as http
response to the XXXwebhandle.java
which then parses back the xml data and puts it on
the GUI components of XXXview.java files.
So, a database exists. Fairly normal stuff there.
THe Problems
1) the conversion of database query resultset to xml
at server and the xml back to fields data
takes a lot of time and is cumbersome to code as we
need code the xml
defination pattern for every data exchange between
server and client.
Again, take a look at JAXB, SOAP and/or XMLBeans.
we need to remove XML .................is it
possible???? Yes
can we send data back to client as java objects and
if yes then how??.RMI + Java Serialization or JAXB/SOAP/XMLBeans.
2) right now we are making JDBC calls to mysql
database using a common Utility class file
created for handling all kinds of sql statements and
return the data via a hashtable object.
No, no no. Hashtable (and all Maps) have no type-safety. You can introduce lots of programming errors casting from Object to another type. It is far better to create an actual Java object that will hold the data. It seems to take more time, but you will have far fewer runtime errors in your application during development, which IMO, actually speeds up the process overall.
We need to use a ORM tool here............dont know
which to use and how to use.
heard of hibernate and EJB.pls suggest which one to
use
Hibernate and, to a lesser extent, JDO are popular now.
Overall i would appreciate if someone can suggest me
good architecture.
is there any framework readily available for
developing these kinda apps
pls guide or give me links where i can get info abt
this.
Rapidly? Hard to say. I would steer clear of full blown J2EE with EJB's or MDB's if you want to speed up development. Ruby on Rails also generates some press for rapidly putting sites together.
thanks
JagsYou are welcome. Best of luck.
- Saish -
How to deploy an app with servlet and background processing
i have a servlet with background processing. it has to run 24 hours a day.
but i have problem with shutdown (after 1-2 hours without user action). [9iAS 9.0.3.0, windows 2000]
i created for application seperate OC4J (in the EM) and i deployed it there. first time as war file, later as ear file (because there is possible to re-deploy only ear file).
but it seems that the servlets are not designated to run as a uninterruptible task.
the question is: how to deploy such (servlet + uninterruptible background processing) application in the 9iAS?
a) everything in the OC4J (then how to disable shutdown?)
b) servlet in the OC4J. where (and how) to install the rest of application?
b1) servlet in the OC4J + rmi/soap/... + standalone server?
what is the standard in the oracle world :) ?
thanksBetter to post your topic in the iPad in the Enterprise community.
This is the, "Using Mac App Store" forum and for the most part for troubleshooting the App Store. -
Utl_http does not give a very helpful error message: Invalid Parameter
I'm writing PL/SQL to consume a web service on another server. In trying to execute this snippet of code, I receive this error:
ORA-28783: Invalid parameter
ORA-06512: at "SYS.UTL_HTTP", line 1023
ORA-06512: at line 29
Line 29 is the utl_http.begin_request statement shown below.
I'm baffled as to what the error message might point to and I'm looking from any insight others may have. The message is so generic as to be useless and I can't find any examples of others receiving this particular error when executing begin_request.
Please note that this is an SSL/HTTPS connection. If I remove the "S" and just use HTTP, I receive an appropriate message from the web server. (A tiny web page telling me I should be using the https version and not the http version.) I can also go to, for example, Google or CNN's web sites and pull back data but those are not SSL connections. It is the SSL part that isn't working.
This isn't a SOAP error since I never get a chance to create my SOAP message and place it in the request.
I've tried changing the POST to GET and the HTTP version to 1.0 just to see if the error message changes and it does not.
My wallet file is in place on the database server, placed in an accessible folder by
the DBAs. This code can see the wallet, I believe, because if I change the wallet
path to something non-existent, I receive a different error. I imported the web site certificate for the site I'm connecting to and placed that in the wallet. I've been able to cause "certificate chain" errors with empty wallets, so I think the certificate is correct.
I used SOAP-UI (www.soapui.org) and was quickly able to connect to the web server and begin having a "SOAP conversation", so I know the web services I'm connecting to are working. It is something in the database itself that is preventing this from executing - the wallet, a setting in the database, something like that. But what?
=======================================================
utl_http.set_response_error_check(enable=>true);
utl_http.set_detailed_excp_support(enable => TRUE);
utl_http.set_follow_redirect(5);
utl_http.set_wallet('file:/...', '*******');
--**** SET THE URL FOR THIS REQUEST *******
http_req:= utl_http.begin_request(
'https://....' --location of web services I want to use
, 'POST'
, utl_http.HTTP_VERSION_1_1
=======================================================You seemrd to have ruled out most potential problems I could think of.
The error message just states that there is something wrong with the parameters that you use. Only point I can currently think of is a problem with the returned value.
How did you declare you http_req variable? Does it use the utl_http.req type? -
WEB_SERVICES_25oct06
Using SOAP with Tomcat
SOAP-ENV:Server.BadTargetObjectURI
I too have this reoccurring problem � Have any of the individuals who have experienced this problem found a solution yet?
I have carefully followed through O'Reilly's �Hello SOAP!� example step by step.
I deploy the Client Code without any problems as my service shows up on the list of deployed services:
Typing �java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter list� into the command-line yields:
Deployed Services:
urn:examples:helloservice
However, when I try to test the client I get the following error:
Hello SOAP Client
Fault Occurred (details follow):
Fault Code: SOAP-ENV:Server.BadTargetObjectURI
Fault String: Unable to resolve target object:
Fault Occurred. No greeting for you!
After this I modify the client code to use port 8070 so that I may use the TCPTunnelGui tool to view my actual SOAP conversation.
To invoke this TCPTunnelGui Tool I type the following into the command line:
�java org.apache.soap.util.net.TcpTunnelGui 8070 localhost 8080�
I then try to test my client again and get the following SOAP messages within the TCPTunnelGui tool
From localhost:8070 :
POST /soap/servlet/rpcrouter HTTP/1.0
Host: 127.0.0.1:8070
Content-Type: text/xml; charset=utf-8
Content-Length: 464
SOAPAction: ""
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:sayHello xmlns:ns1="urn:examples:HelloService" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<firstName xsi:type="xsd:string">maj</firstName>
</ns1:sayHello>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
& From localhost:8080 :
HTTP/1.0 500 Internal Server Error
Content-Type: text/xml; charset=utf-8
Content-Length: 486
Set-Cookie: JSESSIONID=trk0yz6te1;Path=/soap
Date: Thu, 01 Aug 2002 17:23:16 GMT
Server: Tomcat Web Server/3.3.1 Final ( JSP 1.1; Servlet 2.2 )
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server.BadTargetObjectURI</faultcode>
<faultstring>Unable to resolve target object: </faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>1. NEVER post like you did, it causes reading problems - and no one asked you to post it.
2. The Tomcat Web server is not using specified syntax - as version 1.0 does not say 1.0, it said only HTTP. It wasn't until RFC2616 that the version is apended.
3. The RPC Router cannot locate service called ""
You're missing configurations.
Maybe you are looking for
-
In how to customize std no data found message in Bex Report...
Hi I am running my WAD report in Portal and report had no data so giving std message "Could not find any data to display. This might be due to the current selection of variable or filter values" I wanted to change this std message to "No Data Found".
-
Column name in ALV table dissapeared after new language package installatio
Hi, We have a custom field in an ALV table in SAP system. In english everything was just fine with our custom field. But when we installed a new languaged the column name dissapeared. My question is: Where does the ALV get the column name from? Is th
-
Uploading photos from browser to an existing Web Gallery
Hi: This question is related with this thread: http://discussions.apple.com/thread.jspa?threadID=1077164&tstart=15 but I fell that not receiving the right answer because the topic doesn't describe the problem fine. I uploaded a web gallery from iPhot
-
Problem with finding directory
Hi, I built an application on Windows and I have to find a document within another directory. I am using getAbsolutepath and I am having problems with the following type of path: File test = new File("u1/usr/my program/myFile/") if(test.isDirectory()
-
Apps quit unexpectedly on launch and I've already try the troubleshooting options
Apps quit unexpectedly on launch and I've already try the troubleshooting options available on adobe. It still don't work !