<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
DII with Document/Literal remote WS from JBoss?
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/tachoknight">Ron Olson</a> in <i>JBoss Web Services</i> - <a href="http://community.jboss.org/message/558231#558231">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi all-</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm trying to work with a document/literal-style web service from my program deployed on 4.2.3, and I keep getting a wsexception error "cannot obtain java mapping for:...". I'm more familar with RPC-style web services, so I'm a little confused about what I have to do to invoke this document-based web service using DII; generating stubs won't work because I'd have to create a new stub/redeploy for each remote service the program works with.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Here is the code I originally wrote and works with RPC-style web services. I've modified it in my attempt to make it work with the document type, but I keep getting the error I mentioned:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-java">URL url = <font color="navy"><b>new</b></font> URL(remoteInfo.getRemoteURL());
 
            String nameSpace = remoteInfo.getRemoteWSNamespace();
             QName qname = <font color="navy"><b>new</b></font> QName(nameSpace,
                                     remoteInfo.getRemoteWSServiceName());
             QName port = <font color="navy"><b>new</b></font> QName(    nameSpace,
                                     remoteInfo.getRemoteWSServicePort());
             QName operation = <font color="navy"><b>new</b></font> QName(nameSpace,
                                         remoteInfo.getRemoteWSOperation());
 
            ServiceFactory factory = ServiceFactory.newInstance();
             Service service = factory.createService(url, qname);
 
            Call call = service.createCall(port, operation);                
             call.addParameter(<font color="red">"string"</font>, javax.xml.rpc.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
             call.setReturnType(javax.xml.rpc.encoding.XMLType.XSD_STRING);
            
             call.setProperty(Call.OPERATION_STYLE_PROPERTY, <font color="red">"document"</font>);
             call.setProperty(Call.SOAPACTION_USE_PROPERTY, <font color="red">"true"</font>);
             call.setProperty(Call.SOAPACTION_URI_PROPERTY, <font color="red">""</font>);
            
             String realUrl = remoteInfo.getRemoteURL();           
             call.setProperty(Call.SOAPACTION_URI_PROPERTY, realUrl.substring(0, realUrl.indexOf(<font color="navy">'?'</font>)));
                        
             <font color="darkgreen">/* Now we actually call the web service */</font>
             Object result = call.invoke(<font color="navy"><b>new</b></font> Object[] <font color="navy">{</font> dataToDeliver.getDataToSend() <font color="navy">}</font>);
</code></pre><p>            <span style="font-family: courier new,courier;"><br/></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks for any info!</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/558231#558231">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>