• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please help me out in solving the problem using presence webservice + clientgen + eclipse+ weblogic

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have written build.xml that uses clientGen for generating webservices related stuff.

I am using weblogic 10.3 and presence webservice

I have kept the required jars in classpath and build.xml is running fine and stubs and classes are generated

please find my main program for calling webservices using stubs

import org.csapi.schema.parlayx.common.v2_1.SimpleReference;
import org.csapi.schema.parlayx.presence.consumer.v2_3.local.SubscribePresence;
import java.net.URI;
import java.net.URL;
import org.csapi.schema.parlayx.common.v2_1.*;
import org.csapi.schema.parlayx.presence.consumer.v2_3.local.SubscribePresenceResponse;
import com.bea.wlcp.wlng.schema.ews.common.ServiceException;
import com.bea.wlcp.wlng.ws.*;
import com.bea.wlcp.wlng.ws.presence.PresenceConsumer;
import com.bea.wlcp.wlng.ws.presence.PresenceConsumerService_Impl;
import com.bea.wlcp.wlng.ws.presence.PresenceConsumer_Stub;


import javax.xml.rpc.*;



public class Main {

/**
* @param args
*/
public static void main(String[] args) throws javax.xml.rpc.ServiceException,PolicyException{

// TODO Auto-generated method stub
try{
System.out.println(" Hi There here 111");
PresenceConsumerService_Impl pcs_impl = new PresenceConsumerService_Impl("http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL");
PresenceConsumer pc = pcs_impl.getPresenceConsumer();
System.out.println(" Hi There here 222");
SimpleReference rf = new SimpleReference();
System.out.println(" Hi There here 555555");
rf.setCorrelator("correlatorid");
System.out.println(" Hi There here 888888");
rf.setEndpoint(URI.create("http://localhost:8002/PresenceConsumerService/services/PresenceConsumer"));
System.out.println(" Hi There here 9777");
rf.setInterfaceName("PresenceConsumer");
SubscribePresence sb = new SubscribePresence();
sb.setApplication("sdp");
sb.setPresentity(URI.create("tel:1234"));
sb.setReference(rf);

System.out.println(" Hi There here 76989979");
SubscribePresenceResponse spr = pc.subscribePresence(sb);

System.out.println(" Hi There here 2226678565");
System.out.println(" Hi There here 333");
}
catch(PolicyException e)
{
System.out.println(" Hi There here 444");
}
catch(Exception e)
{
e.getCause();
System.out.println(" Hi There here 555"+e.getCause());
}

}

}


please find the my problem

1) from the attachment all stubs and related java files and class files are generated by clientgen under /build/output folder . thats fine and schema and wsdl folders as shown in attachment are in same path , but in my main program , to use

PresenceConsumerService_Impl and PresenceConsumer class and all other generated classes I am not importing from the path where folders are generated from attachment shown as geenrated by clientgen and i am doing like importing
com.bea.wlcp.wlng.ws.presence.PresenceConsumerService_Impl and com.bea.wlcp.wlng.ws.presence.PresenceConsumer and so on. do i need to take the path from folders generated from attachment shown as geenrated by clientgen or wht i did is correct.

2) If i use as above shown in my main program , importing with com.bea...., then wht is the use of generating stubs and classes when we dont import use them in our main program for calling webservices .

3) My third issues , I ket aside and forget abt all the files and stubs generated

I tried to run main programs directly

but i am gettign exception like below
weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity

Please tell me tio whcih class i need to add username,password parameters
I found PresenceConsumerClient from one forum, But it is in somewhere ....V2_0/.. , but in pte.jar , it is not there
so please guide me to which class I need to add secuirty parameters













 
rajabhayya Sekharbhayya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adding to the above information

1) All files are generated under 2 folders

a) build\output\clientclass\org\csapi\schema
b)build\output\clientclass\org\csapi\wsdl

As far as schema folder is OK, but to use presenceconsumer and presenceconsumer_impl class i need to use
org\csapi\wsdl\parlayx\presence\consumer\v2_3\service\PresenceConsumer.java

which is in b) category and I mentioned in previous post I could not able to import the files in my main program , generated by clientgen.
and apart from that , I didnt found the above files in that path in any of jar files i added to classpath , as I menioned in my previous post it is there in com.bea.wlcp.wlng.ws.presence path as I refereed from pte.jar , but it is mysterious for me why the clientgen is generating in build\output\clientclass\org\csapi\wsdl folder, Any one helps or suggestions greatly appreciated
I tried and tried , but helpless .
 
rajabhayya Sekharbhayya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Issues Resolved
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

rajabhayya Sekharbhayya wrote:Issues Resolved



I reached this thread late and its good to know the problem was resolved. But please tell us how you resolved it. It will help developers save time
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic