1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubHandler.java Thu Apr 04 19:05:24 2013 -0700 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubHandler.java Tue Apr 09 14:51:13 2013 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -25,10 +25,11 @@ 1.11 1.12 package com.sun.xml.internal.ws.client.sei; 1.13 1.14 +import com.oracle.webservices.internal.api.databinding.JavaCallInfo; 1.15 import com.sun.xml.internal.ws.api.SOAPVersion; 1.16 import com.sun.xml.internal.ws.api.databinding.ClientCallBridge; 1.17 -import com.sun.xml.internal.ws.api.databinding.JavaCallInfo; 1.18 import com.sun.xml.internal.ws.api.message.Message; 1.19 +import com.sun.xml.internal.ws.api.message.MessageContextFactory; 1.20 import com.sun.xml.internal.ws.api.message.Packet; 1.21 import com.sun.xml.internal.ws.api.model.JavaMethod; 1.22 import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; 1.23 @@ -53,7 +54,7 @@ 1.24 * <ol> 1.25 * <li>Accepts Object[] that represents arguments for a Java method, 1.26 * and creates {@link com.sun.xml.internal.ws.message.jaxb.JAXBMessage} that represents a request message. 1.27 - * <li>Takes a {@link com.sun.xml.internal.ws.api.message.Message] that represents a response, 1.28 + * <li>Takes a {@link com.sun.xml.internal.ws.api.message.Message} that represents a response, 1.29 * and extracts the return value (and updates {@link javax.xml.ws.Holder }s.) 1.30 * </ol> 1.31 * 1.32 @@ -78,8 +79,9 @@ 1.33 protected final Map<QName, CheckedExceptionImpl> checkedExceptions; 1.34 protected SOAPVersion soapVersion = SOAPVersion.SOAP_11; 1.35 protected ResponseBuilder responseBuilder; 1.36 + protected MessageContextFactory packetFactory; 1.37 1.38 - public StubHandler(JavaMethodImpl method) { 1.39 + public StubHandler(JavaMethodImpl method, MessageContextFactory mcf) { 1.40 //keep all the CheckedException model for the detail qname 1.41 this.checkedExceptions = new HashMap<QName, CheckedExceptionImpl>(); 1.42 for(CheckedExceptionImpl ce : method.getCheckedExceptions()){ 1.43 @@ -93,6 +95,7 @@ 1.44 this.soapAction = soapActionFromBinding; 1.45 } 1.46 this.javaMethod = method; 1.47 + packetFactory = mcf; 1.48 1.49 soapVersion = javaMethod.getBinding().getSOAPVersion(); 1.50 1.51 @@ -210,12 +213,13 @@ 1.52 * @param args proxy invocation arguments 1.53 * @return Message for the arguments 1.54 */ 1.55 - public Packet createRequestPacket(JavaCallInfo call) { 1.56 - Message msg = bodyBuilder.createMessage(call.getParameters()); 1.57 + public Packet createRequestPacket(JavaCallInfo args) { 1.58 + Message msg = bodyBuilder.createMessage(args.getParameters()); 1.59 1.60 - for (MessageFiller filler : inFillers) filler.fillIn(call.getParameters(),msg); 1.61 + for (MessageFiller filler : inFillers) filler.fillIn(args.getParameters(),msg); 1.62 1.63 - Packet req = new Packet(msg); 1.64 + Packet req = (Packet)packetFactory.createContext(msg); 1.65 + req.setState(Packet.State.ClientRequest); 1.66 req.soapAction = soapAction; 1.67 req.expectReply = !isOneWay; 1.68 req.getMessage().assertOneWay(isOneWay);