You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Java调用SOAP WebService遇Class not registered异常求助

Troubleshooting COM Registration Error in Java SOAP WebService Call

Hey there! Even though that REGDB_E_CLASSNOTREG error feels super C#-centric, let's unpack why you're hitting it from a Java client—and how to fix it. The key thing to realize here: this error is coming from the remote SOAP WebService server, not your Java code or generated stubs.

Why This Happens (Even with Java)

  • The SOAP service you're calling runs on a Windows-based server (likely ASP.NET or a Windows service) and depends on a COM component. That component with CLSID {28487481-0A2C-4E61-A198-417335F22895} isn't properly registered on the server, so when the service tries to instantiate it, it fails.
  • Architecture mismatch: If the server is 64-bit but the COM component is only registered for 32-bit (or vice versa), the service can't locate the component. For example, IIS app pools running in 64-bit mode can't access 32-bit COM components unless explicitly configured.
  • Corrupted registration: The component's registry entries might be missing or damaged, even if the DLL/OCX file exists on the server.

Steps to Fix the Issue (All Done on the WebService Server)

  1. Locate the COM component

    • On the server, open the Registry Editor (regedit.exe) and search for the CLSID {28487481-0A2C-4E61-A198-417335F22895}. This will show you the path to the associated DLL or OCX file.
  2. Re-register the component

    • Use the regsvr32.exe tool to register the component. Note the bitness:
      • For 32-bit components on a 64-bit server: Run Command Prompt as Administrator and execute C:\Windows\SysWOW64\regsvr32.exe "C:\path\to\your\component.dll"
      • For 64-bit components: Use C:\Windows\System32\regsvr32.exe "C:\path\to\your\component.dll"
    • You should get a confirmation message if registration succeeds.
  3. Check server process architecture

    • If the service is hosted in IIS, go to the application pool settings for your WebService. Enable the "Enable 32-bit Applications" option if you're using a 32-bit COM component. Restart the app pool after making changes.
  4. Verify component functionality

    • Write a quick test app (even a simple C# console app) on the server to instantiate the COM component directly. This confirms the component works outside the SOAP service context, ruling out any service-specific issues.

Remember: Your Java client and generated stubs are probably fine—this is entirely a server-side configuration issue with the dependent COM component.

内容的提问来源于stack exchange,提问作者sathya

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 11:22:33