[JBossWS] - Re: Enabling MTOM-Support at JBossWS client fails
by lfoggy
Well, I am using document/literal wrapped for my wsdl file, and what I have found so far is that mtom only works if the parameter type of the method is DataHandler. For example, this works:
@WebMethod
@RequestWrapper(localName = "sendOctet", targetNamespace = "http://xxx.com/webservice/mtom/", className = "com.xxx.webservice.mtom.SendOctet")
@ResponseWrapper(localName = "sendOctetResponse", targetNamespace = "http://xxx.com/stat/webservice/mtom/", className = "com.xxx.webservice.mtom.SendOctetResponse")
public void sendOctet(
@WebParam(name = "octet", targetNamespace = "")
DataHandler octet,
But if I pass something like List, or another holder bean that contains a DataHandler field, mtom does not work anymore, and the message is send inline.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170124#4170124
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170124
17 years, 4 months
[JBossWS] - Can't get WS-RM to do ExactlyOnce + InOrder
by karypid
I am using this web service to test WS-RM:
@Stateless
| @WebService(serviceName = "MyRMTestService",
| portName = "MyRMTestSOAP",
| targetNamespace = "http://www.example.org/MyRMTest/",
| endpointInterface = "org.example.myrmtest.MyRMTest"
| )
| @EndpointConfig(
| configFile = "META-INF/wsrm-jaxws-endpoint-config.xml",
| configName = "Standard WSRM Endpoint"
| )
| @PolicyAttachment(@Policy(
| policyFileLocation = "META-INF/wsrm-exactly-once-in-order-policy.xml",
| scope = PolicyScopeLevel.WSDL_BINDING
| ))
| public class MyRMTestService {
| public String echo(String in) {
| System.out.println("RECEIVED: " + in);
| try {
| Thread.sleep(2000);
| } catch (InterruptedException e) {
| e.printStackTrace();
| }
| System.out.println("RETURNING from: " + in);
| return in;
| }
| }The policy file contains:<?xml version="1.0" encoding="UTF-8"?>
| <wsp:Policy wsu:Id="exactly_one_in_order_rm_delivery"
| xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
| xmlns:wsrmp="http://docs.oasis-open.org/ws-rx/wsrmp/200702"
| xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
| <wsrmp:DeliveryAssurance>
| <wsp:Policy>
| <wsrmp:ExactlyOnce />
| <wsrmp:InOrder />
| </wsp:Policy>
| </wsrmp:DeliveryAssurance>
| </wsp:Policy>I was assuming that if I send out 5 messages using a simple client they should arrive exactly once and in order. Instead, using this client: public void wsrmTest() throws Throwable {
| final int MAX_PACKETS = 5;
|
| try {
| QName serviceName = new QName("http://www.example.org/MyRMTest/",
| "MyRMTestService");
| URL wsdlURL = new URL(
| "http://localhost:8080/myRMTest/MyRMTestService?wsdl");
| MyRMTest_Service ss = new MyRMTest_Service(wsdlURL, serviceName);
| ssp = ss.getMyRMTestSOAP();
| ((StubExt) ssp).setConfigName("Standard Anonymous WSRM Client",
| "META-INF/wsrm-jaxws-client-config.xml");
|
| Response<EchoResponse> asyncResponse = null;
| for (int i = 0; i < MAX_PACKETS; i++)
| asyncResponse = ssp.echoAsync("ASYNC PACKET " + i);
|
| System.out
| .println("Last response: " + asyncResponse.get());
| } catch (Throwable t) {
| t.printStackTrace();
| throw t;
| }
|
| ((RMProvider) ssp).closeSequence();
| } I get the following output:17:53:14,426 INFO [STDOUT] RECEIVED: ASYNC PACKET 4
| 17:53:14,426 INFO [STDOUT] RECEIVED: ASYNC PACKET 2
| 17:53:14,426 INFO [STDOUT] RECEIVED: ASYNC PACKET 3
| 17:53:14,458 INFO [STDOUT] RECEIVED: ASYNC PACKET 1
| 17:53:14,458 INFO [STDOUT] RECEIVED: ASYNC PACKET 0
| 17:53:16,426 INFO [STDOUT] RETURNING from: ASYNC PACKET 4
| 17:53:16,426 INFO [STDOUT] RETURNING from: ASYNC PACKET 2
| 17:53:16,426 INFO [STDOUT] RETURNING from: ASYNC PACKET 3
| 17:53:16,457 INFO [STDOUT] RETURNING from: ASYNC PACKET 1
| 17:53:16,457 INFO [STDOUT] RETURNING from: ASYNC PACKET 0Is there something wrong with my policy file? Why do messages get delivered "out-of-order"?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170102#4170102
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170102
17 years, 4 months
[JBossWS] - WS Secutiry configration questions
by kosulin
Hi,
We have few external clients requesting their data from the same server using the same endpoint.
I would like to configure security using both their and ours private keys as follows:
- every client signs their request with their private key, and the server uses the corresponding public key (from keystore) to authorize them and get their principal.
- our response is signed with our server private key (from trusted store), and clients use our public key to authenticate the response.
I tried to get through WIKI and User Guide, tried jboss-wsse-server.xml configs from there, but there is no example similar to what I need if I did not miss something.
How do I configure WS-Security for this scenario?
My env: java 6, JBoss 5.0.0CR1, jbossws core 3.02. Clients are .NET if this is important.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170069#4170069
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170069
17 years, 4 months