adding ns1 prefix to Jax ws

8 views
Skip to first unread message

Chikodi Nwanjoku

unread,
Aug 5, 2018, 5:00:32 AM8/5/18
to java Webservices
I have a jax ws application with

WebService(name = "partner", targetNamespace = "http://com.myname.ws")
@SOAPBinding(style = Style.RPC)


public interface Ipartner {
   
@WebMethod


   
public abstract WalletTransferResponse AccountToWalletTransfer(@WebParam(name = "a")int a);
}


@WebService(endpointInterface="com.ietech.interfaces.Ipartner",
        portName
="partnerPort", serviceName = "partner")


public class partner implements Ipartner {
 
@Override
   
public WalletTransferResponse WalletTransfer(@WebParam(name = "a")int a) {


}
}

my request is

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://com.myname.ws">
   
<soapenv:Header/>
   
<soapenv:Body>
     
<com:WalletTransfer>
         
<MobileTransferRequest>


I have a jax ws application with

WebService(name = "partner", targetNamespace = "http://com.myname.ws")
@SOAPBinding(style = Style.RPC)

public interface Ipartner {
    @WebMethod

    public abstract WalletTransferResponse AccountToWalletTransfer(@WebParam(name = "a")int a);
}

@WebService(endpointInterface="com.ietech.interfaces.Ipartner",
        portName="partnerPort", serviceName = "partner")

public class partner implements Ipartner {
 @Override
    public WalletTransferResponse WalletTransfer(@WebParam(name = "a")int a) {

}
}

my request is

 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://com.myname.ws">
   <soapenv:Header/>
   <soapenv:Body>
      <com:WalletTransfer>
         <MobileTransferRequest>

and my response is


<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">



   
<S:Body>

     
<ns3:WalletTransferResponse xmlns:ns2="http://my.ws" xmlns:ns3="http://com.myname.ws">

         
<return>


for my response how do i have ns1 as the prefix at against com? and for my response how do i have the same namespace prefix ns1 at against ns3, which i have now, and i dont know where ns2 and ns3 namespace is coming from, because i dont have such.

for my request this is what i need






<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://com.myname.ws">

   
<soapenv:Header/>

   
<soapenv:Body>

     
<ns1:WalletTransfer>

         
<MobileTransferRequest>


and response


<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://com.myname.ws">



   
<S:Body>

     
<ns1:WalletTransferResponse>



         
<return>


Chikodi Nwanjoku

unread,
Aug 5, 2018, 5:06:55 AM8/5/18
to java Webservices


On Sunday, August 5, 2018 at 10:00:32 AM UTC+1, Chikodi Nwanjoku wrote:
I have a jax ws application with

WebService(name = "partner", targetNamespace = "http://com.myname.ws")
@SOAPBinding(style = Style.RPC)


public interface Ipartner {
   
@WebMethod



   
public abstract WalletTransferResponse WalletTransfer(@WebParam(name = "a")int a);

}


@WebService(endpointInterface="com.ietech.interfaces.Ipartner",
        portName
="partnerPort", serviceName = "partner")


public class partner implements Ipartner {
 
@Override
   
public WalletTransferResponse WalletTransfer(@WebParam(name = "a")int a) {


}
}

my request is

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://com.myname.ws">
   
<soapenv:Header/>
   
<soapenv:Body>
     
<com:WalletTransfer>
         
<MobileTransferRequest>


I have a jax ws application with

WebService(name = "partner", targetNamespace = "http://com.myname.ws")
@SOAPBinding(style = Style.RPC)

public interface Ipartner {
    @WebMethod


    public abstract WalletTransferResponse WalletTransfer(@WebParam(name = "a")int a);
Reply all
Reply to author
Forward
0 new messages