Scott--

You are quite right, but something even more surprising happens. Making the 
adjustment as appropriate (and correcting for a few other errors of no interest 
here) I get the result I expect from SOAP, but the Fedora log continues to show 
an ERROR:

(FedoraAPIMBindingSOAPHTTPImpl) Error adding datastream 
fedora.server.errors.GeneralException: Invalid control group: A

The datastream is created, the SOAP return message is fine, and if I wasn't 
watching the log, I wouldn't have known it happened. I'm still not sure whether 
it matters, because the datastream appears to be fine, but the log error 
appears at level ERROR, which is not usually something to ignore. Perhaps it is 
in this case?

This seems a little surprising: is the parsing of the parameters out of the 
SOAP call completely dependent on -order-? A missing parameter shifts every 
other parameter in the message into another slot and destroys the ability to 
produce an immediately useful fault? That seems surprisingly fragile... but 
perhaps I misunderstand the cause at work?

---
A. Soroka
Digital Research and Scholarship R & D
the University of Virginia Library



On Aug 20, 2010, at 2:35 PM, Scott Prater wrote:

> Hi, Adam --
> 
> It looks like you're missing the MIMEType parameter (right after versionable) 
> in your addDatastream request;  perhaps the sequence of parameters gets out 
> of whack?
> 
> https://wiki.duraspace.org/display/FCR30/API-M#API-M-addDatastream
> 
> -- Scott
> 
> [email protected] wrote:
>> I'm seeing what I think is an oddity in the response to a SOAP call I'm 
>> making on a 3.2.1 repository. The SOAP method call is automatically 
>> generated by an XSLT transform from a JMS message emitted by another 
>> repository, so I can readily believe that there might be problems with it, 
>> but it's not clear to me why this particular fault is occurring. My SOAP 
>> message is listed below my sig ("First listing") and it clearly includes:
>> <controlGroup>M</controlGroup>
>> but the SOAP response (second listing below) is an fault with:
>> <faultcode>soapenv:Server.userException</faultcode><faultstring>fedora.server.errors.GeneralException:
>>  Invalid control group: A</faultstring>
>> with the Fedora log showing (third listing below):
>> (FedoraAPIMBindingSOAPHTTPImpl) Error adding datastream 
>> fedora.server.errors.GeneralException: Invalid control group: A
>> Has anyone seen anything like this? A little Googling didn't turn up 
>> anything. I'm inclined to turn up logging in Fedora to see where the 
>> parameter goes awry, but I'm not sure which packages are relevant.
>> ---
>> A. Soroka
>> Digital Research and Scholarship R & D
>> the University of Virginia Library
>> First listing:
>> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";>
>>    <env:Body>
>>        <addDatastream xmlns="http://www.fedora.info/definitions/1/0/types/";>
>>            <pid>test:25</pid>
>>            <dsID>bar</dsID>
>>            <altIDs/>
>>            <dsLabel>null</dsLabel>
>>            <versionable>true</versionable>
>>            <formatURI>null</formatURI>
>>            
>> <dsLocation>http://www.springframework.org/schema/beans/spring-beans.xsd</dsLocation>
>>            <controlGroup>M</controlGroup>
>>            <dsState>A</dsState>
>>            <checksumType>null</checksumType>
>>            <checksum>null</checksum>
>>            <logMessage>null</logMessage>
>>        </addDatastream>
>>    </env:Body>
>> </env:Envelope>
>> Second listing:
>> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>>    <soapenv:Body>
>>        <soapenv:Fault>
>>            <faultcode>soapenv:Server.userException</faultcode>
>>            <faultstring>fedora.server.errors.GeneralException: Invalid 
>> control group: A</faultstring>
>>            <detail>
>>                <ns1:hostname 
>> xmlns:ns1="http://xml.apache.org/axis/";>ajs6f-mbpro-2.local</ns1:hostname>
>>            </detail>
>>        </soapenv:Fault>
>>    </soapenv:Body>
>> </soapenv:Envelope>
>> Third listing:
>> ERROR 2010-08-20 12:59:37.931 [http-10080-2] (FedoraAPIMBindingSOAPHTTPImpl) 
>> Error adding datastream
>> fedora.server.errors.GeneralException: Invalid control group: A
>>      at 
>> fedora.server.management.DefaultManagement.addDatastream(DefaultManagement.java:461)
>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>      at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>      at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>      at java.lang.reflect.Method.invoke(Method.java:597)
>>      at 
>> fedora.server.messaging.NotificationInvocationHandler.invoke(NotificationInvocationHandler.java:70)
>>      at $Proxy0.addDatastream(Unknown Source)
>>      at 
>> fedora.server.management.ManagementModule.addDatastream(ManagementModule.java:213)
>>      at 
>> fedora.server.management.FedoraAPIMBindingSOAPHTTPImpl.addDatastream(FedoraAPIMBindingSOAPHTTPImpl.java:216)
>>      at 
>> fedora.server.management.FedoraAPIMBindingSOAPHTTPSkeleton.addDatastream(FedoraAPIMBindingSOAPHTTPSkeleton.java:372)
>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>      at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>      at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>      at java.lang.reflect.Method.invoke(Method.java:597)
>>      at 
>> org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
>>      at 
>> org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
>>      at 
>> org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
>>      at 
>> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>>      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>>      at 
>> org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
>>      at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
>>      at 
>> org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
>>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>>      at 
>> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
>>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>      at 
>> fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>      at 
>> fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>      at 
>> fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>      at 
>> fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>      at 
>> fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>      at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>      at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>      at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>      at 
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
>>      at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>>      at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>      at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>      at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
>>      at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
>>      at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>>      at 
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
>>      at java.lang.Thread.run(Thread.java:637)
>> DEBUG 2010-08-20 12:59:37.932 [http-10080-2] (FedoraAPIMBindingSOAPHTTPImpl) 
>> end: addDatastream, test:25, bar
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Make an app they can't live without
>> Enter the BlackBerry Developer Challenge
>> http://p.sf.net/sfu/RIM-dev2dev 
>> _______________________________________________
>> Fedora-commons-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
> 
> 
> -- 
> Scott Prater
> Library, Instructional, and Research Applications (LIRA)
> Division of Information Technology (DoIT)
> University of Wisconsin - Madison
> [email protected]


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to