x
I'm sorry, but you have been denied access to edit this topic.
gleepinator

Bimserver soap authentication?

Bim server isn't responding well to attempts to authenticate and perform other functions in the same soap file. Can I set up a session with just SOAP commands, or is that better done through Java/etc?
2 people have
this question
+1
Reply

  • Léon van Berlo EMPLOYEE
    sad I’m frustrated
    Hi,

    There are some problems with Windows tools that don't use SOAP the correct way.

    I guess you already looked at the SOAP example at: http://code.google.com/docreader/?p=b...

    ??
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated kidding, amused, unsure, silly

  • gleepinator
    I have looked at that, yes.

    The question came up because I was playing with a desktop application that sends and receives SOAP messages based on the wsdl, but I couldn't do more than ping and login, because the other functions require that you be logged in already. I was trying to modify the SOAP messages (add a header or something) for authentication, and wanted to know if that sort of thing is supported by the BiMserver.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated kidding, amused, unsure, silly

  • Have a look at: http://code.google.com/docreader/?p=b...

    BIMserver is using sessions to remember the user credentials.
    Make sure to enable session management in your client, otherwise the server won't be able to remember who you are and you will get this message:

    "Authentication required for this call"

    For Apache CXF, you can enable sessions this way:
    ((javax.xml.ws.BindingProvider)port).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);

    For .Net based clients, this can be done this way:
    client = new BiMserver.ServiceInterfaceService();
    client.CookieContainer = new System.Net.CookieContainer();
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated kidding, amused, unsure, silly

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated kidding, amused, unsure, silly

  • simonphoenix
    sad I’m frustrated
    Hi,

    I have nearly the some problem but the suggested solution does not work.
    I try this analog to the createClient method in the ServiceHolder.java
    But the "Authenthication required" is still there...

    SERVER
    ===========

    org.bimserver.webservices.MyService implementor = new MyService(this, AccessMethod.SOAP);
    JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();

    svrFactory.setServiceClass(MyServiceInterface.class);
    svrFactory.setAddress("http://localhost:8083/myservice");
    svrFactory.setServiceBean(implementor);
    svrFactory.create();
    CLIENT
    =======
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.getInInterceptors().add(new LoggingInInterceptor());
    factory.getOutInterceptors().add(new LoggingOutInterceptor());
    factory.setServiceClass(MyServiceInterface.class);
    factory.setAddress("http://localhost:8083/myservice");
    MyServiceInterface client = (MyServiceInterface) factory.create();

    ((BindingProvider) client).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);

    Does not work

    If I call a method: "Authentication required for this call"appears
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated kidding, amused, unsure, silly

  • This reply was removed on 2011-09-22.
    see the change log